playlist_mig.go 696 B

1234567891011121314151617181920
  1. package migrations
  2. import . "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
  3. func addPlaylistMigrations(mg *Migrator) {
  4. playlistV1 := Table{
  5. Name: "playlist",
  6. Columns: []*Column{
  7. {Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
  8. {Name: "title", Type: DB_NVarchar, Length: 255, Nullable: false},
  9. {Name: "type", Type: DB_NVarchar, Length: 255, Nullable: false},
  10. {Name: "data", Type: DB_Text, Nullable: false},
  11. {Name: "timespan", Type: DB_NVarchar, Length: 255, Nullable: false},
  12. {Name: "org_id", Type: DB_BigInt, Nullable: false},
  13. },
  14. }
  15. // create table
  16. mg.AddMigration("create playlist table v1", NewAddTableMigration(playlistV1))
  17. }