2022-12-07 07:34:45 +01:00
|
|
|
CREATE TABLE users (
|
|
|
|
id BIGSERIAL PRIMARY KEY,
|
|
|
|
account_id BIGINT REFERENCES accounts (id),
|
|
|
|
email VARCHAR NOT NULL,
|
|
|
|
password VARCHAR NOT NULL,
|
2022-12-19 15:45:03 +01:00
|
|
|
reason VARCHAR DEFAULT NULL,
|
|
|
|
activated BOOLEAN NOT NULL DEFAULT FALSE,
|
2023-01-20 19:24:32 +01:00
|
|
|
locale VARCHAR NOT NULL,
|
|
|
|
private_key bytea NOT NULL
|
2022-12-07 07:34:45 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX index_users_on_email ON users (email);
|