Since creatorID is no longer treated as a UUID type in the code from the database we need to make sure that it isn't null in the database. This updates all empty string and null values for this column to the Zero UUID, and makes the column a not null definition with a default fo the Zero UUID.
8 lines
338 B
PL/PgSQL
8 lines
338 B
PL/PgSQL
BEGIN;
|
|
|
|
update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL;
|
|
update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = '';
|
|
alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000';
|
|
|
|
COMMIT;
|