feat: add stuff for categories
The get and post methods currently are just copies of the channel ones
This commit is contained in:
parent
b7b07141f9
commit
45bca0bd20
7 changed files with 488 additions and 0 deletions
|
@ -0,0 +1,4 @@
|
|||
-- This file should undo anything in `up.sql`
|
||||
ALTER TABLE channels DROP COLUMN in_category;
|
||||
|
||||
DROP TABLE categories;
|
10
migrations/2025-07-12-135941_add_channel_categories/up.sql
Normal file
10
migrations/2025-07-12-135941_add_channel_categories/up.sql
Normal file
|
@ -0,0 +1,10 @@
|
|||
-- Your SQL goes here
|
||||
CREATE TABLE categories (
|
||||
uuid UUID PRIMARY KEY NOT NULL,
|
||||
guild_uuid UUID NOT NULL REFERENCES guilds(uuid),
|
||||
name VARCHAR(32) NOT NULL,
|
||||
description VARCHAR(500) DEFAULT NULL,
|
||||
is_above UUID UNIQUE REFERENCES categories(uuid) DEFAULT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE channels ADD COLUMN in_category UUID REFERENCES categories(uuid) DEFAULT NULL;
|
Loading…
Add table
Add a link
Reference in a new issue