updated table constraints

This commit is contained in:
farhan 2021-01-06 02:43:41 +00:00
parent 5ea270f9ec
commit 48acaa5b0b

View File

@ -4,7 +4,7 @@ DROP TABLE IF EXISTS accounts;
CREATE TABLE accounts ( CREATE TABLE accounts (
actor_type VARCHAR(1000) NOT NULL, actor_type VARCHAR(1000) NOT NULL,
id VARCHAR(2083) NOT NULL PRIMARY KEY, id VARCHAR(2083) NOT NULL PRIMARY KEY UNIQUE,
inbox VARCHAR(2083) NOT NULL, inbox VARCHAR(2083) NOT NULL,
outbox VARCHAR(2083) NOT NULL, outbox VARCHAR(2083) NOT NULL,
followers VARCHAR(2083) NOT NULL, followers VARCHAR(2083) NOT NULL,
@ -21,7 +21,7 @@ CREATE TABLE accounts (
); );
CREATE TABLE posts ( CREATE TABLE posts (
id VARCHAR(2083) NOT NULL, id VARCHAR(2083) NOT NULL PRIMARY KEY UNIQUE,
inreplyto VARCHAR(2083), inreplyto VARCHAR(2083),
published TIMESTAMP with time zone NOT NULL, published TIMESTAMP with time zone NOT NULL,
summary TEXT, summary TEXT,
@ -34,7 +34,7 @@ CREATE TABLE posts (
); );
CREATE TABLE instances ( CREATE TABLE instances (
endpoint VARCHAR(2083) NOT NULL, endpoint VARCHAR(2083) NOT NULL PRIMARY KEY UNIQUE,
autostart BOOLEAN, autostart BOOLEAN,
state VARCHAR(16), state VARCHAR(16),
username VARCHAR(32), username VARCHAR(32),