2022-12-05 20:22:46 +01:00
|
|
|
CREATE TABLE accounts (
|
2022-12-06 02:40:42 +01:00
|
|
|
id BIGSERIAL PRIMARY KEY,
|
2022-12-25 15:57:33 +01:00
|
|
|
iri VARCHAR,
|
2022-12-05 20:22:46 +01:00
|
|
|
name VARCHAR NOT NULL,
|
|
|
|
domain VARCHAR NOT NULL,
|
|
|
|
display_name VARCHAR DEFAULT NULL,
|
|
|
|
created_at TIMESTAMP NOT NULL DEFAULT now(),
|
2022-12-06 02:40:42 +01:00
|
|
|
updated_at TIMESTAMP NOT NULL DEFAULT now()
|
2022-12-05 20:22:46 +01:00
|
|
|
);
|
|
|
|
|
2022-12-25 15:57:33 +01:00
|
|
|
CREATE UNIQUE INDEX index_accounts_on_iri ON accounts (iri);
|
2022-12-05 20:22:46 +01:00
|
|
|
CREATE UNIQUE INDEX index_accounts_on_name_and_domain ON accounts (name, domain);
|