nyanoblog/migrations/20221205020531_create_accounts.sql
fef 323fe471c5
add statuses
This commit requires wiping the database, because
it changes the accounts migration as well.
2022-12-06 02:40:42 +01:00

10 lines
332 B
SQL

CREATE TABLE accounts (
id BIGSERIAL PRIMARY KEY,
name VARCHAR NOT NULL,
domain VARCHAR NOT NULL,
display_name VARCHAR DEFAULT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now(),
updated_at TIMESTAMP NOT NULL DEFAULT now()
);
CREATE UNIQUE INDEX index_accounts_on_name_and_domain ON accounts (name, domain);