Split approved site and whitelisted site scope tables.

pull/210/head
Amanda Anganes 2012-08-22 15:21:42 -04:00
parent e5b62e8935
commit dc61068702
3 changed files with 13 additions and 9 deletions

View File

@ -165,10 +165,10 @@ public class ApprovedSite {
*/ */
@ElementCollection(fetch = FetchType.EAGER) @ElementCollection(fetch = FetchType.EAGER)
@CollectionTable( @CollectionTable(
name="allowed_scope", name="approved_site_scope",
joinColumns=@JoinColumn(name="owner_id") joinColumns=@JoinColumn(name="owner_id")
) )
@Column(name="allowed_scope") @Column(name="scope")
public Set<String> getAllowedScopes() { public Set<String> getAllowedScopes() {
return allowedScopes; return allowedScopes;
} }

View File

@ -103,10 +103,10 @@ public class WhitelistedSite {
*/ */
@ElementCollection(fetch = FetchType.EAGER) @ElementCollection(fetch = FetchType.EAGER)
@CollectionTable( @CollectionTable(
name="allowed_scope", name="whitelisted_site_scope",
joinColumns=@JoinColumn(name="owner_id") joinColumns=@JoinColumn(name="owner_id")
) )
@Column(name="allowed_scope") @Column(name="scope")
public Set<String> getAllowedScopes() { public Set<String> getAllowedScopes() {
return allowedScopes; return allowedScopes;
} }

View File

@ -19,11 +19,6 @@ CREATE TABLE address (
country VARCHAR(256) country VARCHAR(256)
); );
CREATE TABLE allowed_scope (
owner_id BIGINT,
allowed_scope VARCHAR(256)
);
CREATE TABLE approved_site ( CREATE TABLE approved_site (
id BIGINT AUTO_INCREMENT PRIMARY KEY, id BIGINT AUTO_INCREMENT PRIMARY KEY,
user_id VARCHAR(4096), user_id VARCHAR(4096),
@ -34,6 +29,11 @@ CREATE TABLE approved_site (
whitelisted_site_id VARCHAR(256) whitelisted_site_id VARCHAR(256)
); );
CREATE TABLE approved_site_scope (
owner_id BIGINT,
scope VARCHAR(256)
);
CREATE TABLE authentication_holder ( CREATE TABLE authentication_holder (
id BIGINT AUTO_INCREMENT PRIMARY KEY, id BIGINT AUTO_INCREMENT PRIMARY KEY,
owner_id BIGINT, owner_id BIGINT,
@ -169,3 +169,7 @@ CREATE TABLE whitelisted_site (
client_id VARCHAR(256) client_id VARCHAR(256)
); );
CREATE TABLE whitelisted_site_scope (
owner_id BIGINT,
scope VARCHAR(256)
);