alter table astglobals add column astium integer;
update astglobals set astium = 1 where astium IS NULL;
alter table astglobals alter column astium set NOT NULL;
alter table astglobals alter column astium set default '1';
ALTER TABLE astglobals ADD CONSTRAINT astglobals_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_duogsm add column astium integer;
update card_duogsm set astium = 1 where astium IS NULL;
alter table card_duogsm alter column astium set NOT NULL;
alter table card_duogsm alter column astium set default '1';
ALTER TABLE card_duogsm ADD CONSTRAINT card_duogsm_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_e100p add column astium integer;
update card_e100p set astium = 1 where astium IS NULL;
alter table card_e100p alter column astium set NOT NULL;
alter table card_e100p alter column astium set default '1';
ALTER TABLE card_e100p ADD CONSTRAINT card_e100p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_octobri add column astium integer;
update card_octobri set astium = 1 where astium IS NULL;
alter table card_octobri alter column astium set NOT NULL;
alter table card_octobri alter column astium set default '1';
ALTER TABLE card_octobri ADD CONSTRAINT card_octobri_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_quadbri add column astium integer;
update card_quadbri set astium = 1 where astium IS NULL;
alter table card_quadbri alter column astium set NOT NULL;
alter table card_quadbri alter column astium set default '1';
ALTER TABLE card_quadbri ADD CONSTRAINT card_quadbri_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_quadgsm add column astium integer;
update card_quadgsm set astium = 1 where astium IS NULL;
alter table card_quadgsm alter column astium set NOT NULL;
alter table card_quadgsm alter column astium set default '1';
ALTER TABLE card_quadgsm ADD CONSTRAINT card_quadgsm_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_t100p add column astium integer;
update card_t100p set astium = 1 where astium IS NULL;
alter table card_t100p alter column astium set NOT NULL;
alter table card_t100p alter column astium set default '1';
ALTER TABLE card_t100p ADD CONSTRAINT card_t100p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_tdm2400p add column astium integer;
update card_tdm2400p set astium = 1 where astium IS NULL;
alter table card_tdm2400p alter column astium set NOT NULL;
alter table card_tdm2400p alter column astium set default '1';
ALTER TABLE card_tdm2400p ADD CONSTRAINT card_tdm2400p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_tdm400p add column astium integer;
update card_tdm400p set astium = 1 where astium IS NULL;
alter table card_tdm400p alter column astium set NOT NULL;
alter table card_tdm400p alter column astium set default '1';
ALTER TABLE card_tdm400p ADD CONSTRAINT card_tdm400p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_tdm410 add column astium integer;
update card_tdm410 set astium = 1 where astium IS NULL;
alter table card_tdm410 alter column astium set NOT NULL;
alter table card_tdm410 alter column astium set default '1';
ALTER TABLE card_tdm410 ADD CONSTRAINT card_tdm410_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_tdm800p add column astium integer;
update card_tdm800p set astium = 1 where astium IS NULL;
alter table card_tdm800p alter column astium set NOT NULL;
alter table card_tdm800p alter column astium set default '1';
ALTER TABLE card_tdm800p ADD CONSTRAINT card_tdm800p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_te110p add column astium integer;
update card_te110p set astium = 1 where astium IS NULL;
alter table card_te110p alter column astium set NOT NULL;
alter table card_te110p alter column astium set default '1';
ALTER TABLE card_te110p ADD CONSTRAINT card_te110p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_te120p add column astium integer;
update card_te120p set astium = 1 where astium IS NULL;
alter table card_te120p alter column astium set NOT NULL;
alter table card_te120p alter column astium set default '1';
ALTER TABLE card_te120p ADD CONSTRAINT card_te120p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_te205p add column astium integer;
update card_te205p set astium = 1 where astium IS NULL;
alter table card_te205p alter column astium set NOT NULL;
alter table card_te205p alter column astium set default '1';
ALTER TABLE card_te205p ADD CONSTRAINT card_te205p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_te210p add column astium integer;
update card_te210p set astium = 1 where astium IS NULL;
alter table card_te210p alter column astium set NOT NULL;
alter table card_te210p alter column astium set default '1';
ALTER TABLE card_te210p ADD CONSTRAINT card_te210p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_te405p add column astium integer;
update card_te405p set astium = 1 where astium IS NULL;
alter table card_te405p alter column astium set NOT NULL;
alter table card_te405p alter column astium set default '1';
ALTER TABLE card_te405p ADD CONSTRAINT card_te405p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_te410p add column astium integer;
update card_te410p set astium = 1 where astium IS NULL;
alter table card_te410p alter column astium set NOT NULL;
alter table card_te410p alter column astium set default '1';
ALTER TABLE card_te410p ADD CONSTRAINT card_te410p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_unogsm add column astium integer;
update card_unogsm set astium = 1 where astium IS NULL;
alter table card_unogsm alter column astium set NOT NULL;
alter table card_unogsm alter column astium set default '1';
ALTER TABLE card_unogsm ADD CONSTRAINT card_unogsm_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table card_x100p add column astium integer;
update card_x100p set astium = 1 where astium IS NULL;
alter table card_x100p alter column astium set NOT NULL;
alter table card_x100p alter column astium set default '1';
ALTER TABLE card_x100p ADD CONSTRAINT card_x100p_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table trunk add column astium integer;
update trunk set astium = 1 where astium IS NULL;
alter table trunk alter column astium set NOT NULL;
alter table trunk alter column astium set default '1';
ALTER TABLE trunk ADD CONSTRAINT trunk_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table zap_channel add column astium integer;
update zap_channel set astium = 1 where astium IS NULL;
alter table zap_channel alter column astium set NOT NULL;
alter table zap_channel alter column astium set default '1';
ALTER TABLE zap_channel ADD CONSTRAINT zap_channel_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table phone add column astium integer;
update phone set astium = 1 where astium IS NULL;
alter table phone alter column astium set NOT NULL;
alter table phone alter column astium set default '1';
ALTER TABLE phone ADD CONSTRAINT phone_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table dmz_to_external add column astium integer;
update dmz_to_external set astium = 1 where astium IS NULL;
alter table dmz_to_external alter column astium set NOT NULL;
alter table dmz_to_external alter column astium set default '1';
ALTER TABLE dmz_to_external ADD CONSTRAINT dmz_to_external_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table dmz_to_internal add column astium integer;
update dmz_to_internal set astium = 1 where astium IS NULL;
alter table dmz_to_internal alter column astium set NOT NULL;
alter table dmz_to_internal alter column astium set default '1';
ALTER TABLE dmz_to_internal ADD CONSTRAINT dmz_to_internal_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table external_to_dmz add column astium integer;
update external_to_dmz set astium = 1 where astium IS NULL;
alter table external_to_dmz alter column astium set NOT NULL;
alter table external_to_dmz alter column astium set default '1';
ALTER TABLE external_to_dmz ADD CONSTRAINT external_to_dmz_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table external_to_internal add column astium integer;
update external_to_internal set astium = 1 where astium IS NULL;
alter table external_to_internal alter column astium set NOT NULL;
alter table external_to_internal alter column astium set default '1';
ALTER TABLE external_to_internal ADD CONSTRAINT external_to_internal_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table internal_to_dmz add column astium integer;
update internal_to_dmz set astium = 1 where astium IS NULL;
alter table internal_to_dmz alter column astium set NOT NULL;
alter table internal_to_dmz alter column astium set default '1';
ALTER TABLE internal_to_dmz ADD CONSTRAINT internal_to_dmz_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table internal_to_external add column astium integer;
update internal_to_external set astium = 1 where astium IS NULL;
alter table internal_to_external alter column astium set NOT NULL;
alter table internal_to_external alter column astium set default '1';
ALTER TABLE internal_to_external ADD CONSTRAINT internal_to_external_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

alter table to_intf_external add column astium integer;
update to_intf_external set astium = 1 where astium IS NULL;
alter table to_intf_external alter column astium set NOT NULL;
alter table to_intf_external alter column astium set default '1';
ALTER TABLE to_intf_external ADD CONSTRAINT to_intf_external_astium_constraint FOREIGN KEY (astium) REFERENCES astium (id);

