BEGIN;
alter table parkinglot add column fallback integer;
update parkinglot set fallback = '1' where fallback IS NULL;
alter table parkinglot alter column fallback set default '1';
alter table parkinglot alter column fallback set not null;
COMMIT;

BEGIN;
ALTER TABLE parkinglot ADD CONSTRAINT parkinglot_fallback_constraint FOREIGN KEY (fallback) REFERENCES phoneline (id);
COMMIT;
