PublicDashboards: Backfills share column with default value (#63407)

adds migration to backfill empty share column fields with default value of public
This commit is contained in:
owensmallwood
2023-02-27 15:54:16 -06:00
committed by GitHub
parent 43a9156d23
commit dc01e1ee6a

View File

@ -92,4 +92,8 @@ func addPublicDashboardMigration(mg *Migrator) {
Nullable: false, Nullable: false,
Default: "'public'", Default: "'public'",
})) }))
mg.AddMigration("backfill empty share column fields with default of public", NewRawSQLMigration(
"UPDATE dashboard_public SET share='public' WHERE share=''",
))
} }