Can create a family
This commit is contained in:
@ -14,18 +14,18 @@ CREATE TABLE users (
|
||||
admin BOOLEAN NOT NULL DEFAULT FALSE
|
||||
);
|
||||
|
||||
CREATE TABLE families(
|
||||
CREATE TABLE families (
|
||||
id SERIAL PRIMARY KEY,
|
||||
time_create BIGINT NOT NULL,
|
||||
name VARCHAR(30) NOT NULL,
|
||||
invitation_code VARCHAR(7) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE memberships(
|
||||
CREATE TABLE memberships (
|
||||
user_id integer NOT NULL REFERENCES users,
|
||||
family_id integer NOT NULL REFERENCES families,
|
||||
time_create BIGINT NOT NULL,
|
||||
is_admin BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
is_admin BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
|
||||
PRIMARY KEY(user_id, family_id)
|
||||
);
|
Reference in New Issue
Block a user