nyanoblog/migrations/20221225041649_create_objects.sql
2022-12-25 18:29:33 +01:00

11 lines
393 B
SQL

CREATE TABLE objects (
id UUID PRIMARY KEY,
iri VARCHAR NOT NULL,
data VARCHAR NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now(),
updated_at TIMESTAMP NOT NULL DEFAULT now()
);
CREATE UNIQUE INDEX index_objects_on_iri ON objects (iri);
CREATE INDEX index_objects_on_created_at ON objects (created_at);
CREATE INDEX index_objects_on_updated_at ON objects (updated_at);