focalboard/server/services/store/sqlstore/migrations/000008_teams.up.sql
Doug Lauder 2a5c033fa5
Idempotent schema and data migrations (#4253)
* modify all migration scripts for idempotency
* Add readme
2022-12-16 11:15:38 -05:00

8 lines
368 B
SQL

{{- /* addColumnIfNeeded tableName columnName datatype constraint */ -}}
{{ addColumnIfNeeded "blocks" "workspace_id" "varchar(36)" ""}}
{{ addColumnIfNeeded "sharing" "workspace_id" "varchar(36)" ""}}
{{ addColumnIfNeeded "sessions" "auth_service" "varchar(20)" ""}}
UPDATE {{.prefix}}blocks SET workspace_id = '0' WHERE workspace_id = '' OR workspace_id IS NULL;