-- calendars

ALTER TABLE
	"calendars"
ADD COLUMN
	"hue" INTEGER NULL
;

UPDATE
	"calendars"
SET
	"hue" = (("id" * 40503) % 65535)
;

ALTER TABLE
	"calendars"
ALTER COLUMN
	"hue" SET NOT NULL
;

COMMENT ON COLUMN
	"calendars"."hue"
IS
	'scaled to a value between 0 and 65535'
;


-- _meta

UPDATE
    "_meta"
SET
    "revision" = 'r5'
;
