waveterm/wavesrv/db/migrations/000011_cmdscreenid.up.sql

6 lines
160 B
SQL

ALTER TABLE cmd ADD COLUMN screenid varchar(36) NOT NULL DEFAULT '';
UPDATE cmd
SET screenid = (SELECT line.screenid FROM line WHERE line.cmdid = cmd.cmdid)
;