Merge pull request #3597 from eddawley/ISSUE-3461

Issue 3461: Session table is now created automatically
This commit is contained in:
Torkel Ödegaard 2015-12-24 09:59:34 +01:00
commit 69eb62c09f
2 changed files with 17 additions and 0 deletions

View File

@ -19,6 +19,7 @@ func AddMigrations(mg *Migrator) {
addDashboardSnapshotMigrations(mg)
addQuotaMigration(mg)
addPluginBundleMigration(mg)
addSessionMigration(mg)
}
func addMigrationLogMigrations(mg *Migrator) {

View File

@ -0,0 +1,16 @@
package migrations
import . "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
func addSessionMigration(mg *Migrator) {
var sessionV1 = Table{
Name: "session",
Columns: []*Column{
{Name: "key", Type: DB_Char, IsPrimaryKey: true, Length: 16},
{Name: "data", Type: DB_Blob},
{Name: "expiry", Type: DB_Integer, Length: 255, Nullable: false},
},
}
mg.AddMigration("create session table", NewAddTableMigration(sessionV1))
}