Fixing position of comment offset creation

This commit is contained in:
Jason Fulghum
2024-01-31 15:56:38 -08:00
parent 7894356e5a
commit cc7e9fc970
@@ -56,6 +56,7 @@ func serializeSchemaAsFlatbuffer(sch schema.Schema) ([]byte, error) {
rows := serializeClusteredIndex(b, sch)
indexes := serializeSecondaryIndexes(b, sch, sch.Indexes().AllIndexes())
checks := serializeChecks(b, sch.Checks().AllChecks())
comment := b.CreateString(sch.GetComment())
var hasFeaturesAfterTryAccessors bool
for _, col := range sch.GetAllCols().GetColumns() {
@@ -72,7 +73,6 @@ func serializeSchemaAsFlatbuffer(sch schema.Schema) ([]byte, error) {
serial.TableSchemaAddChecks(b, checks)
serial.TableSchemaAddCollation(b, serial.Collation(sch.GetCollation()))
if sch.GetComment() != "" {
comment := b.CreateString(sch.GetComment())
serial.TableSchemaAddComment(b, comment)
hasFeaturesAfterTryAccessors = true
}