mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* SQLStore: Fix Postgres dialect treating "false" migrator default as true Previously, when creating a migration you could choose a default value for a new boolean column that looked correct but would be interpreted incorrectly by the Postgres dialect. For example, values such as "false" or "FALSE" would be treated as true by the Postgres dialect. This refactors how migration dialects determine the Default column value for boolean type columns. Each dialect now uses the same base code to parse the Default literal and panics if an unknown value is encountered. So, now AddColumnMigration and AddTableMigration will ensure that across dialects: - The exact same Default literals will be allowed. - The literals are converted to equivalent defaults in their DDL. - An error will be thrown if an invalid literal is provided. |
||
---|---|---|
.. | ||
migrations | ||
migrator | ||
permissions | ||
searchstore | ||
session | ||
sqlutil | ||
bulk_test.go | ||
bulk.go | ||
database_wrapper.go | ||
logger.go | ||
session_test.go | ||
session.go | ||
sqlstore_metrics_test.go | ||
sqlstore_metrics.go | ||
sqlstore_test.go | ||
sqlstore.go | ||
tls_mysql.go | ||
transactions_test.go | ||
transactions.go | ||
user.go |