mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #3597 from eddawley/ISSUE-3461
Issue 3461: Session table is now created automatically
This commit is contained in:
commit
69eb62c09f
@ -19,6 +19,7 @@ func AddMigrations(mg *Migrator) {
|
||||
addDashboardSnapshotMigrations(mg)
|
||||
addQuotaMigration(mg)
|
||||
addPluginBundleMigration(mg)
|
||||
addSessionMigration(mg)
|
||||
}
|
||||
|
||||
func addMigrationLogMigrations(mg *Migrator) {
|
||||
|
16
pkg/services/sqlstore/migrations/session_mig.go
Normal file
16
pkg/services/sqlstore/migrations/session_mig.go
Normal 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))
|
||||
}
|
Loading…
Reference in New Issue
Block a user