feat: make channel description nullable

This commit is contained in:
Radical 2025-05-22 16:28:58 +02:00
parent a6d35b0ba2
commit 2e1382c1d4
3 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,4 @@
-- This file should undo anything in `up.sql`
UPDATE channels SET description = '' WHERE description IS NULL;
ALTER TABLE ONLY channels ALTER COLUMN description SET NOT NULL;
ALTER TABLE ONLY channels ALTER COLUMN description DROP DEFAULT;

View file

@ -0,0 +1,3 @@
-- Your SQL goes here
ALTER TABLE ONLY channels ALTER COLUMN description DROP NOT NULL;
ALTER TABLE ONLY channels ALTER COLUMN description SET DEFAULT NULL;

View file

@ -26,7 +26,7 @@ diesel::table! {
#[max_length = 32]
name -> Varchar,
#[max_length = 500]
description -> Varchar,
description -> Nullable<Varchar>,
}
}