From 3e1d7bd42b8037b66c7c07bd7e161176a64f8b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Tue, 12 Dec 2023 09:26:31 +0100 Subject: [PATCH] Fix dal schema alt to use correct attribute codec idents --- server/store/adapters/rdbms/dal/connection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/store/adapters/rdbms/dal/connection.go b/server/store/adapters/rdbms/dal/connection.go index 205efe674..e959cb0fe 100644 --- a/server/store/adapters/rdbms/dal/connection.go +++ b/server/store/adapters/rdbms/dal/connection.go @@ -358,7 +358,7 @@ func (c *connection) applyAlterationAttributeAdd(ctx context.Context, model *dal } func (c *connection) applyAlterationAttributeDelete(ctx context.Context, model *dal.Model, alt *dal.Alteration) (err error) { - return c.dataDefiner.ColumnDrop(ctx, model.Ident, alt.AttributeDelete.Attr.Ident) + return c.dataDefiner.ColumnDrop(ctx, model.Ident, alt.AttributeDelete.Attr.StoreIdent()) } func (c *connection) applyAlterationAttributeReType(ctx context.Context, model *dal.Model, alt *dal.Alteration) (err error) { @@ -490,7 +490,7 @@ func (c *connection) assertAlterationAttributeDelete(table *ddl.Table, colIndex func (c *connection) assertAlterationAttributeReType(table *ddl.Table, colIndex map[string]*ddl.Column, alt *dal.Alteration) (out []*dal.Alteration, err error) { col := colIndex[alt.AttributeReType.Attr.StoreIdent()] if col == nil { - err = fmt.Errorf("cannot alter %s, column does not exist", alt.AttributeReType.Attr.Ident) + err = fmt.Errorf("cannot alter %s, column does not exist", alt.AttributeReType.Attr.StoreIdent()) return }