feat(acquisition): add category grouping for acquisition methods
Add category field to acquisition_methods table with 'General' default Group acquisition methods by category in item and recipe detail views Enable category management in admin configuration
This commit is contained in:
@@ -1169,6 +1169,7 @@ CREATE TABLE IF NOT EXISTS pokemon_favorite_things (
|
||||
CREATE TABLE IF NOT EXISTS acquisition_methods (
|
||||
id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
|
||||
name text NOT NULL UNIQUE,
|
||||
category text NOT NULL DEFAULT 'General',
|
||||
sort_order integer NOT NULL DEFAULT 0 CHECK (sort_order >= 0),
|
||||
created_by_user_id integer REFERENCES users(id) ON DELETE SET NULL,
|
||||
updated_by_user_id integer REFERENCES users(id) ON DELETE SET NULL,
|
||||
@@ -1565,6 +1566,9 @@ ALTER TABLE environments
|
||||
ALTER TABLE favorite_things
|
||||
ADD COLUMN IF NOT EXISTS opposite_favorite_thing_id integer;
|
||||
|
||||
ALTER TABLE acquisition_methods
|
||||
ADD COLUMN IF NOT EXISTS category text NOT NULL DEFAULT 'General';
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
|
||||
Reference in New Issue
Block a user