freechat/json-api/migrations/2020-03-11-005217_channels/up.sql
shockrah 36dbc8dd1e + Badges introduction to database schemas
+ Adding some default empty list values where applicable
neighbors now has a default value of '[]' to enforce the "empty list" constraint on that field
2021-05-17 15:50:53 -07:00

10 lines
301 B
SQL

-- TODO: somehow make the name colum unique
CREATE TABLE IF NOT EXISTS `channels` (
`id` BIGINT UNSIGNED NOT NULL,
`name` VARCHAR(255) NOT NULL,
`description` VARCHAR(2048),
`kind` INTEGER NOT NULL,
`badges` VARCHAR(2048) DEFAULT '[]',
PRIMARY KEY(`id`), UNIQUE KEY(`name`)
);