dodil/erp-brick-consolidation
DODIL ERP brick: consolidation
src/brick_consolidation/migrations/00004_v3/up.sql
-- 00004_v3 (spec v3) - additive only: where a company's books are (source gl | upload) on a structure row and its change, with the local currency and name
-- of a company kept outside gl (CON-12). ADD COLUMN is DISRUPTIVE: migrate the test copy first, the live one at a quiet hour.
ALTER TABLE cons_group_structure ADD COLUMN IF NOT EXISTS source VARCHAR;
ALTER TABLE cons_group_structure ADD COLUMN IF NOT EXISTS local_currency VARCHAR;
ALTER TABLE cons_group_structure ADD COLUMN IF NOT EXISTS name VARCHAR;
ALTER TABLE cons_structure_change ADD COLUMN IF NOT EXISTS source VARCHAR;
ALTER TABLE cons_structure_change ADD COLUMN IF NOT EXISTS name VARCHAR;