X-Git-Url: http://juplo.de/gitweb/?p=examples%2Ffacebook-app;a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fschema.sql;fp=src%2Fmain%2Fresources%2Fschema.sql;h=c3abb8f0c1155e70cf1d14684d786068e9aa1464;hp=0000000000000000000000000000000000000000;hb=3ba0e06f2f52ca1959dccaa33e288369914571af;hpb=fad2b31abc3dca5b748565aeee192ac6694bfecb diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql new file mode 100644 index 0000000..c3abb8f --- /dev/null +++ b/src/main/resources/schema.sql @@ -0,0 +1,19 @@ +-- This SQL contains a "create table" that can be used to create a table that JdbcUsersConnectionRepository can persist +-- connection in. It is, however, not to be assumed to be production-ready, all-purpose SQL. It is merely representative +-- of the kind of table that JdbcUsersConnectionRepository works with. The table and column names, as well as the general +-- column types, are what is important. Specific column types and sizes that work may vary across database vendors and +-- the required sizes may vary across API providers. + +create table UserConnection (userId varchar(255) not null, + providerId varchar(255) not null, + providerUserId varchar(255), + rank int not null, + displayName varchar(255), + profileUrl varchar(512), + imageUrl varchar(512), + accessToken varchar(512) not null, + secret varchar(512), + refreshToken varchar(512), + expireTime bigint, + primary key (userId, providerId, providerUserId)); +create unique index UserConnectionRank on UserConnection(userId, providerId, rank);