fix(authz): sqlmigration for postgres (#9616)

* fix(authz): sqlmigration for postgres

* fix(authz): only launch transaction for pg

* fix(authz): fix the sql migration number

* fix(authz): add integration tests for public_dashboard

* fix(authz): added changes for tuples in integration tests

* fix(authz): added changes for tuples in integration tests

* fix(authz): reduce cyclomatic complexity
This commit is contained in:
Vikrant Gupta
2025-11-19 23:50:39 +05:30
committed by GitHub
parent 39bd169b89
commit 4e6c42dd17
9 changed files with 273 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ import (
var (
DataTypeText = DataType{s: valuer.NewString("TEXT"), z: ""}
DataTypeBytea = DataType{s: valuer.NewString("BYTEA"), z: ""}
DataTypeBigInt = DataType{s: valuer.NewString("BIGINT"), z: int64(0)}
DataTypeInteger = DataType{s: valuer.NewString("INTEGER"), z: int64(0)}
DataTypeNumeric = DataType{s: valuer.NewString("NUMERIC"), z: float64(0)}
+4
View File
@@ -18,6 +18,10 @@ func NewFormatter(dialect schema.Dialect) Formatter {
}
func (formatter Formatter) SQLDataTypeOf(dataType DataType) string {
if dataType == DataTypeBytea {
return strings.ToUpper(DataTypeText.String())
}
return strings.ToUpper(dataType.String())
}