BEGIN;
alter table queue add column weight integer;
update queue set weight = '0' where weight is null;
alter table queue alter column weight set default '0';
alter table queue alter column weight set not null;
commit;

