3
0

Add upgrade schema for meta column in dal_connections table

This commit is contained in:
Vivek Patel
2022-08-04 14:48:52 +05:30
parent c2e9f93710
commit 85f399d2e4
2 changed files with 10 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ func (s *Store) Upgrade(ctx context.Context) (err error) {
fix202209_extendComposeModuleFieldsForPrivacyAndDAL,
fix202209_dropObsoleteComposeModuleFields,
fix202209_composeRecordRevisions,
fix202209_extendDalConnectionsForMeta,
}
for _, fix := range fixes {

View File

@@ -116,3 +116,12 @@ func fix202209_composeRecordRevisions(ctx context.Context, s *Store) (err error)
//// make a copy of records to changes table
//return s.Exec(ctx, copyAll)
}
func fix202209_extendDalConnectionsForMeta(ctx context.Context, s *Store) (err error) {
s.log(ctx).Info("extending dal_connections table with meta column")
return s.SchemaAPI.AddColumn(
ctx, s.DB,
&Table{Name: "dal_connections"},
&Column{Type: ColumnType{Type: ColumnTypeJson}, DefaultValue: "'{}'", Name: "meta"},
)
}