BEGIN;
alter table contact add column parkinglot integer;
update contact set parkinglot = '1' where parkinglot IS NULL;
alter table contact alter column parkinglot set default '1';
alter table contact alter column parkinglot set not null;
ALTER TABLE contact ADD CONSTRAINT contact_parkinglot_constraint FOREIGN KEY (parkinglot) REFERENCES parkinglot (id);

COMMIT;
