mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added preferences migrations
This commit is contained in:
parent
430c312263
commit
662579e9a9
@ -21,6 +21,7 @@ func AddMigrations(mg *Migrator) {
|
|||||||
addAppSettingsMigration(mg)
|
addAppSettingsMigration(mg)
|
||||||
addSessionMigration(mg)
|
addSessionMigration(mg)
|
||||||
addPlaylistMigrations(mg)
|
addPlaylistMigrations(mg)
|
||||||
|
addPreferencesMigrations(mg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func addMigrationLogMigrations(mg *Migrator) {
|
func addMigrationLogMigrations(mg *Migrator) {
|
||||||
|
20
pkg/services/sqlstore/migrations/preferences_mig.go
Normal file
20
pkg/services/sqlstore/migrations/preferences_mig.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package migrations
|
||||||
|
|
||||||
|
import . "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
|
||||||
|
|
||||||
|
func addPreferencesMigrations(mg *Migrator) {
|
||||||
|
|
||||||
|
preferencesV1 := Table{
|
||||||
|
Name: "preferences",
|
||||||
|
Columns: []*Column{
|
||||||
|
{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
|
||||||
|
{Name: "pref_id", Type: DB_Int, Nullable: false},
|
||||||
|
{Name: "pref_type", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||||
|
{Name: "pref_data", Type: DB_Text, Nullable: false},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// create table
|
||||||
|
mg.AddMigration("create preferences table v1", NewAddTableMigration(preferencesV1))
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user