mirror of
https://github.com/SigNoz/signoz.git
synced 2026-05-03 05:29:59 -05:00
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:
@@ -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)}
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user