feat(schema): #48 monthly_budget em categories + category_id em achievements
- Migration 018: ADD COLUMN monthly_budget NUMERIC(12,2) em categories - Migration 018: ADD COLUMN category_id INTEGER REFERENCES categories(id) ON DELETE CASCADE em achievements - Remove conquistas hardcoded veleiro_under_500 e health_3months do banco - Reset game state do profile_id=1 - Atualiza CategoryRepository, CategoryInput e Category model para incluir monthly_budget
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
ALTER TABLE categories ADD COLUMN IF NOT EXISTS monthly_budget NUMERIC(12,2);
|
||||
|
||||
ALTER TABLE achievements ADD COLUMN IF NOT EXISTS category_id INTEGER REFERENCES categories(id) ON DELETE CASCADE;
|
||||
|
||||
-- Remove conquistas hardcoded com categorias específicas
|
||||
DELETE FROM player_achievements WHERE achievement_id IN (
|
||||
SELECT id FROM achievements WHERE unlock_condition IN ('veleiro_under_500', 'health_3months')
|
||||
);
|
||||
DELETE FROM achievements WHERE unlock_condition IN ('veleiro_under_500', 'health_3months');
|
||||
|
||||
-- Reset game state do profile_id=1
|
||||
DELETE FROM player_achievements WHERE profile_id = 1;
|
||||
DELETE FROM xp_events WHERE profile_id = 1;
|
||||
DELETE FROM player_quests WHERE profile_id = 1;
|
||||
UPDATE player_profile SET level = 1, xp = 0, xp_to_next = 100 WHERE profile_id = 1;
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES (18) ON CONFLICT DO NOTHING;
|
||||
Reference in New Issue
Block a user