fef
c227d09af3
This matches the ActivityPub terminology, so why not do it as long as it's still possible to arbitrarily change the database schema.
12 lines
382 B
SQL
12 lines
382 B
SQL
CREATE TABLE notes (
|
|
id BIGSERIAL PRIMARY KEY,
|
|
account_id BIGINT REFERENCES accounts(id),
|
|
uri VARCHAR,
|
|
content TEXT NOT NULL,
|
|
summary TEXT DEFAULT NULL,
|
|
sensitive BOOLEAN NOT NULL DEFAULT FALSE,
|
|
created_at TIMESTAMP NOT NULL DEFAULT now(),
|
|
updated_at TIMESTAMP NOT NULL DEFAULT now()
|
|
);
|
|
|
|
CREATE INDEX index_notes_on_created_at ON notes (created_at);
|