mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-12 21:30:29 +05:30
Add pubsub table.
This commit is contained in:
parent
b0a97faf4f
commit
b3c06354f7
@ -31,3 +31,7 @@ CREATE TABLE IF NOT EXISTS users_subscribed (
|
||||
);
|
||||
|
||||
--rollback DROP TABLE IF EXISTS users_subscribed;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS pubsub_subbed_at_idx ON pubsub (subbed_at ASC) USING HASH;
|
||||
|
||||
--rollback DROP INDEX IF EXISTS pubsub_subbed_at_idx;
|
||||
|
@ -32,3 +32,7 @@ CREATE INDEX IF NOT EXISTS users_subscribed_subscriber_idx ON users_subscribed (
|
||||
CREATE INDEX IF NOT EXISTS users_subscribed_channel_idx ON users_subscribed (channel ASC);
|
||||
|
||||
--rollback DROP TABLE IF EXISTS users_subscribed;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS pubsub_subbed_at_idx ON pubsub (subbed_at ASC);
|
||||
|
||||
--rollback DROP INDEX IF EXISTS pubsub_subbed_at_idx;
|
||||
|
@ -23,3 +23,13 @@ CREATE TABLE IF NOT EXISTS channels (
|
||||
CREATE INDEX IF NOT EXISTS channels_uploader_idx ON channels (uploader ASC);
|
||||
|
||||
--rollback DROP TABLE IF EXISTS channels;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS pubsub (
|
||||
id VARCHAR(24) NOT NULL,
|
||||
subbed_at INT8 NULL,
|
||||
CONSTRAINT pubsub_pkey PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS pubsub_id_idx ON pubsub (id ASC);
|
||||
|
||||
--rollback DROP TABLE IF EXISTS pubsub;
|
||||
|
Loading…
Reference in New Issue
Block a user