mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
* chore: Force license uuids to not be null * All unit tests generate uuids for licenses * Update migration files to new numbers * Put migration in transaction
9 lines
253 B
PL/PgSQL
9 lines
253 B
PL/PgSQL
BEGIN;
|
|
|
|
-- We need to assign uuids to any existing licenses that don't have them.
|
|
UPDATE licenses SET uuid = gen_random_uuid() WHERE uuid IS NULL;
|
|
-- Assert no licenses have null uuids.
|
|
ALTER TABLE ONLY licenses ALTER COLUMN uuid SET NOT NULL;
|
|
|
|
COMMIT;
|