~vpzom/lotide

ref: 6f183c37ed24dfe1b8fc69a68f31b10bda3e49bd lotide/migrations/20200628150439_likes/up.sql -rw-r--r-- 458 bytes
6f183c37Colin Reeder Update docs with new env variables 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
BEGIN;
	CREATE TABLE post_like (
		post	BIGINT NOT NULL REFERENCES post ON DELETE CASCADE,
		person BIGINT NOT NULL REFERENCES person ON DELETE CASCADE,
		local BOOLEAN NOT NULL,
		ap_id TEXT,
		PRIMARY KEY (post, person)
	);

	CREATE TABLE reply_like (
		reply BIGINT NOT NULL REFERENCES reply ON DELETE CASCADE,
		person BIGINT NOT NULL REFERENCES person ON DELETE CASCADE,
		local BOOLEAN NOT NULL,
		ap_id TEXT,
		PRIMARY KEY (reply, person)
	);
COMMIT;