Drop existing default on Users.Timezone prior to column type change (#18669)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
850fef1ad1
Коммит
9d8214c72a
@@ -133,6 +133,7 @@ type SqlStore struct {
|
||||
// ColumnInfo holds information about a column.
|
||||
type ColumnInfo struct {
|
||||
DataType string
|
||||
DefaultValue string
|
||||
CharMaximumLength int
|
||||
}
|
||||
|
||||
@@ -651,7 +652,7 @@ func (ss *SqlStore) GetColumnInfo(tableName, columnName string) (*ColumnInfo, er
|
||||
var columnInfo ColumnInfo
|
||||
if ss.DriverName() == model.DatabaseDriverPostgres {
|
||||
err := ss.GetMaster().SelectOne(&columnInfo,
|
||||
`SELECT data_type as DataType,
|
||||
`SELECT data_type as DataType, COALESCE(column_default, '') as DefaultValue,
|
||||
COALESCE(character_maximum_length, 0) as CharMaximumLength
|
||||
FROM information_schema.columns
|
||||
WHERE lower(table_name) = lower($1)
|
||||
@@ -663,7 +664,7 @@ func (ss *SqlStore) GetColumnInfo(tableName, columnName string) (*ColumnInfo, er
|
||||
return &columnInfo, nil
|
||||
} else if ss.DriverName() == model.DatabaseDriverMysql {
|
||||
err := ss.GetMaster().SelectOne(&columnInfo,
|
||||
`SELECT data_type as DataType,
|
||||
`SELECT data_type as DataType, COALESCE(column_default, '') as DefaultValue,
|
||||
COALESCE(character_maximum_length, 0) as CharMaximumLength
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE()
|
||||
|
||||
Ссылка в новой задаче
Block a user