From 23c42da8ec7e93ccae7010602e5fe988f91101a0 Mon Sep 17 00:00:00 2001 From: Caleb Doxsey Date: Wed, 31 Aug 2022 10:16:19 -0600 Subject: [PATCH] postgres: remove not null constraint on data column of record changes table (#3594) --- pkg/storage/postgres/migrate.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/storage/postgres/migrate.go b/pkg/storage/postgres/migrate.go index 33fab28b4..0d872aa9e 100644 --- a/pkg/storage/postgres/migrate.go +++ b/pkg/storage/postgres/migrate.go @@ -128,6 +128,17 @@ var migrations = []func(context.Context, pgx.Tx) error{ return err } + return nil + }, + 4: func(ctx context.Context, tx pgx.Tx) error { + _, err := tx.Exec(ctx, ` + ALTER TABLE `+schemaName+`.`+recordChangesTableName+` + ALTER data DROP NOT NULL + `) + if err != nil { + return err + } + return nil }, }