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

