blob: 4f61fc9df27dc55902ab74fbf43ca0bc16356b78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
create table users(
username varchar(32) not null primary key,
password varchar(124) not null,
enabled smallint not null
);
create table authorities (
username varchar(32) not null,
authority varchar(50) not null,
constraint fk_authorities_users foreign key(username) references users(username));
create unique index ix_auth_username on authorities (username,authority);
create table groups (
id bigint generated by default as identity(start with 0) primary key,
group_name varchar(50) not null);
create table group_authorities (
group_id bigint not null,
authority varchar(50) not null,
constraint fk_group_authorities_group foreign key(group_id) references groups(id));
create table group_members (
id bigint generated by default as identity(start with 0) primary key,
username varchar(32) not null,
group_id bigint not null,
constraint fk_group_members_group foreign key(group_id) references groups(id));
|