fix: add NOT NULL to table keys
This commit is contained in:
parent
0b516a269d
commit
3c976d666d
1 changed files with 4 additions and 4 deletions
|
@ -50,18 +50,18 @@ async fn main() -> Result<(), Error> {
|
||||||
email_verified boolean NOT NULL DEFAULT FALSE
|
email_verified boolean NOT NULL DEFAULT FALSE
|
||||||
);
|
);
|
||||||
CREATE TABLE IF NOT EXISTS instance_permissions (
|
CREATE TABLE IF NOT EXISTS instance_permissions (
|
||||||
uuid uuid REFERENCES users(uuid),
|
uuid uuid NOT NULL REFERENCES users(uuid),
|
||||||
administrator boolean NOT NULL DEFAULT FALSE
|
administrator boolean NOT NULL DEFAULT FALSE
|
||||||
);
|
);
|
||||||
CREATE TABLE IF NOT EXISTS refresh_tokens (
|
CREATE TABLE IF NOT EXISTS refresh_tokens (
|
||||||
token varchar(64) PRIMARY KEY UNIQUE NOT NULL,
|
token varchar(64) PRIMARY KEY UNIQUE NOT NULL,
|
||||||
uuid uuid REFERENCES users(uuid),
|
uuid uuid NOT NULL REFERENCES users(uuid),
|
||||||
created int8 NOT NULL
|
created int8 NOT NULL
|
||||||
);
|
);
|
||||||
CREATE TABLE IF NOT EXISTS access_tokens (
|
CREATE TABLE IF NOT EXISTS access_tokens (
|
||||||
token varchar(32) PRIMARY KEY UNIQUE NOT NULL,
|
token varchar(32) PRIMARY KEY UNIQUE NOT NULL,
|
||||||
refresh_token varchar(64) UNIQUE REFERENCES refresh_tokens(token),
|
refresh_token varchar(64) UNIQUE NOT NULL REFERENCES refresh_tokens(token),
|
||||||
uuid uuid REFERENCES users(uuid),
|
uuid uuid NOT NULL REFERENCES users(uuid),
|
||||||
created int8 NOT NULL
|
created int8 NOT NULL
|
||||||
)
|
)
|
||||||
"#)
|
"#)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue