I fixed case that updating BYTES default value when adding BYTES column with NOT NULL.
reproduce
schema diff
> bytes BYTES(MAX) NOT NULL,
hammer diff
ALTER TABLE test ADD COLUMN bytes BYTES(MAX)
UPDATE test SET bytes = '' WHERE bytes IS NULL
ALTER TABLE test ALTER COLUMN bytes BYTES(MAX) NOT NULL
hammer apply error
Error: rpc error: code = InvalidArgument desc = Value of type STRING cannot be assigned to bytes, which has type BYTES [at 1:25]\nUPDATE test SET bytes = \'\' WHERE bytes IS NULL\n
Hi!
I fixed case that updating
BYTES
default value when addingBYTES
column withNOT NULL
.reproduce
schema diff
hammer diff
hammer apply error