Commit 662579e9 by utkarshcmu

Added preferences migrations

parent 430c3122
...@@ -21,6 +21,7 @@ func AddMigrations(mg *Migrator) { ...@@ -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) {
......
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))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment