Released version 1.0.0
[examples/facebook-app] / src / main / resources / schema.sql
1 -- This SQL contains a "create table" that can be used to create a table that JdbcUsersConnectionRepository can persist
2 -- connection in. It is, however, not to be assumed to be production-ready, all-purpose SQL. It is merely representative
3 -- of the kind of table that JdbcUsersConnectionRepository works with. The table and column names, as well as the general
4 -- column types, are what is important. Specific column types and sizes that work may vary across database vendors and
5 -- the required sizes may vary across API providers. 
6
7 create table UserConnection (userId varchar(255) not null,
8         providerId varchar(255) not null,
9         providerUserId varchar(255),
10         rank int not null,
11         displayName varchar(255),
12         profileUrl varchar(512),
13         imageUrl varchar(512),
14         accessToken varchar(512) not null,
15         secret varchar(512),
16         refreshToken varchar(512),
17         expireTime bigint,
18         primary key (userId, providerId, providerUserId));
19 create unique index UserConnectionRank on UserConnection(userId, providerId, rank);