Merge branch 'master' of https://github.com/grafana/grafana into metadata

This commit is contained in:
utkarshcmu
2016-02-01 10:32:36 -08:00
284 changed files with 3875 additions and 234675 deletions
@@ -4,7 +4,7 @@ import . "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
func addAppSettingsMigration(mg *Migrator) {
appSettingsV1 := Table{
appSettingsV2 := Table{
Name: "app_settings",
Columns: []*Column{
{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
@@ -13,6 +13,7 @@ func addAppSettingsMigration(mg *Migrator) {
{Name: "enabled", Type: DB_Bool, Nullable: false},
{Name: "pinned", Type: DB_Bool, Nullable: false},
{Name: "json_data", Type: DB_Text, Nullable: true},
{Name: "secure_json_data", Type: DB_Text, Nullable: true},
{Name: "created", Type: DB_DateTime, Nullable: false},
{Name: "updated", Type: DB_DateTime, Nullable: false},
},
@@ -21,8 +22,10 @@ func addAppSettingsMigration(mg *Migrator) {
},
}
mg.AddMigration("create app_settings table v1", NewAddTableMigration(appSettingsV1))
mg.AddMigration("Drop old table app_settings v1", NewDropTableMigration("app_settings"))
mg.AddMigration("create app_settings table v2", NewAddTableMigration(appSettingsV2))
//------- indexes ------------------
addTableIndicesMigrations(mg, "v3", appSettingsV1)
addTableIndicesMigrations(mg, "v3", appSettingsV2)
}