6
migrations/009_posts_post_type.sql
Normal file
6
migrations/009_posts_post_type.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Posts use post_type (image/video/...) instead of category for feed classification.
|
||||
|
||||
ALTER TABLE posts ADD COLUMN IF NOT EXISTS post_type TEXT NOT NULL DEFAULT 'text';
|
||||
ALTER TABLE posts ALTER COLUMN category_id DROP NOT NULL;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_posts_post_type ON posts(post_type);
|
||||
Reference in New Issue
Block a user