Remove categories (fixes #1429) #176

Merged
dessalines merged 2 commits from remove-categories into main 2021-02-25 16:35:09 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 72783edb17 - Show all commits

View File

@ -31,4 +31,4 @@ insert into category (name) values
('Meta'),
('Other');
ALTER TABLE community ADD category_id int references category on update cascade on delete cascade not null;
ALTER TABLE community ADD category_id int references category on update cascade on delete cascade not null default 1;

Did you test this? I'd be surprised if it works since there's not a default value given (should probably be just 1). Its unavoidable but we lose all category info on the tables with this.

Did you test this? I'd be surprised if it works since there's not a default value given (should probably be just 1). Its unavoidable but we lose all category info on the tables with this.

I did (with diesel migration revert/run), but maybe I tested it wrong. Will add the default you suggested.

I did (with diesel migration revert/run), but maybe I tested it wrong. Will add the default you suggested.