waveterm/wavesrv/db/migrations/000012_historylinenum.up.sql

7 lines
176 B
MySQL
Raw Normal View History

2023-03-18 05:36:49 +01:00
ALTER TABLE history ADD COLUMN linenum int NOT NULL DEFAULT 0;
UPDATE history
SET linenum = COALESCE((SELECT line.linenum FROM line WHERE line.lineid = history.lineid), 0)
;