mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
prevent nulls (problem with my DB)
This commit is contained in:
@@ -2,12 +2,12 @@ ALTER TABLE remote_instance RENAME COLUMN windowid TO screenid;
|
||||
ALTER TABLE line RENAME COLUMN windowid TO screenid;
|
||||
|
||||
UPDATE remote_instance
|
||||
SET screenid = (SELECT screen.screenid FROM screen WHERE screen.windowid = remote_instance.screenid)
|
||||
SET screenid = COALESCE((SELECT screen.screenid FROM screen WHERE screen.windowid = remote_instance.screenid), '')
|
||||
WHERE screenid <> ''
|
||||
;
|
||||
|
||||
UPDATE line
|
||||
SET screenid = (SELECT screen.screenid FROM screen WHERE screen.windowid = line.screenid)
|
||||
SET screenid = COALESCE((SELECT screen.screenid FROM screen WHERE screen.windowid = line.screenid), '')
|
||||
WHERE screenid <> ''
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user