db_changes

This commit is contained in:
Булат Хайруллин 2025-02-28 22:31:55 +03:00
parent aced0f0f47
commit 40e6d2c1ea

View file

@ -72,4 +72,42 @@
ADD CONSTRAINT driver_license_pkey PRIMARY KEY ("all_M_W",recording_date,recruitment_id,schema,convicts);
</sql>
</changeSet>
<changeSet id="0005" author="hairullinb">
<comment>create column total_registered.education_level.convicts</comment>
<sql>
ALTER TABLE IF EXISTS total_registered.education_level
ADD COLUMN IF NOT EXISTS convicts VARCHAR;
UPDATE total_registered.education_level
SET convicts = 'ALL';
ALTER TABLE IF EXISTS total_registered.education_level
DROP CONSTRAINT IF EXISTS education_level_pkey;
ALTER TABLE IF EXISTS total_registered.education_level
ADD CONSTRAINT education_level_pkey PRIMARY KEY ("all_M_W",recording_date,recruitment_id,schema,convicts);
</sql>
</changeSet>
<changeSet id="0006" author="hairullinb">
<comment>alter column total_registered.busyness.convicts</comment>
<sql>
ALTER TABLE total_registered.busyness
DROP COLUMN IF EXISTS convicts,
DROP COLUMN IF EXISTS convicts_percent;
ALTER TABLE IF EXISTS total_registered.busyness
ADD COLUMN IF NOT EXISTS convicts VARCHAR;
UPDATE total_registered.busyness
SET convicts = 'ALL';
ALTER TABLE IF EXISTS total_registered.busyness
DROP CONSTRAINT IF EXISTS busyness_pkey;
ALTER TABLE IF EXISTS total_registered.busyness
ADD CONSTRAINT busyness_pkey PRIMARY KEY (registered,recruitment_id,recording_date,"all_M_W",schema,convicts);
</sql>
</changeSet>
</databaseChangeLog>