updated db to support state history

This commit is contained in:
2026-02-07 13:24:49 -05:00
parent 3dc5461783
commit d321c83f49
3 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
/* Replace with your SQL commands */
UPDATE members m
JOIN account_states s ON m.state_id = s.id
SET m.state_legacy = s.name;
ALTER TABLE members DROP FOREIGN KEY fk_members_state_id,
DROP INDEX idx_members_state_id,
DROP COLUMN state_id;
ALTER TABLE members
RENAME COLUMN state_legacy TO state;
DROP TABLE IF EXISTS member_state_history;
DROP TABLE IF EXISTS account_states;