mirror of https://github.com/LemmyNet/lemmy
Feature add three six and nine months options backend (#3226)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>pull/3363/head^2
parent
50efb1d519
commit
f5209fffc1
@ -0,0 +1,14 @@
|
||||
-- update the default sort type
|
||||
update local_user set default_sort_type = 'TopDay' where default_sort_type in ('TopThreeMonths', 'TopSixMonths', 'TopNineMonths');
|
||||
|
||||
-- rename the old enum
|
||||
alter type sort_type_enum rename to sort_type_enum__;
|
||||
-- create the new enum
|
||||
CREATE TYPE sort_type_enum AS ENUM ('Active', 'Hot', 'New', 'Old', 'TopDay', 'TopWeek', 'TopMonth', 'TopYear', 'TopAll', 'MostComments', 'NewComments');
|
||||
|
||||
-- alter all you enum columns
|
||||
alter table local_user
|
||||
alter column default_sort_type type sort_type_enum using default_sort_type::text::sort_type_enum;
|
||||
|
||||
-- drop the old enum
|
||||
drop type sort_type_enum__;
|
@ -0,0 +1,4 @@
|
||||
-- Update the enums
|
||||
ALTER TYPE sort_type_enum ADD VALUE 'TopThreeMonths';
|
||||
ALTER TYPE sort_type_enum ADD VALUE 'TopSixMonths';
|
||||
ALTER TYPE sort_type_enum ADD VALUE 'TopNineMonths';
|
Loading…
Reference in New Issue