<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
                      http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
					  
	<changeSet id="0001" author="saliakhov">
        <comment>create column</comment>
		<sql>
			ALTER TABLE ervu_dashboard.citizen ADD COLUMN IF NOT EXISTS target_recruitment_id uuid NULL;
			ALTER TABLE ervu_dashboard.citizen ADD COLUMN IF NOT EXISTS system_pgs_status varchar(10) NULL;
			ALTER TABLE ervu_dashboard.citizen ADD COLUMN IF NOT EXISTS deferment_decision_type varchar NULL;

			COMMENT ON COLUMN ervu_dashboard.citizen.target_recruitment_id IS 'Целевой ВК';
			COMMENT ON COLUMN ervu_dashboard.citizen.system_pgs_status IS 'Статус ЕРВУ';
			COMMENT ON COLUMN ervu_dashboard.citizen.deferment_decision_type IS 'Тип права на отсрочку или освобождения от призыва';
			
			ALTER TABLE ervu_dashboard.citizen_complex_filters ADD COLUMN IF NOT EXISTS count_children int4 NULL;
			
			COMMENT ON COLUMN ervu_dashboard.citizen_complex_filters.count_children IS 'Количество несовершеннолетних детей';
		</sql>
	</changeSet>
</databaseChangeLog>