mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
rename annotation_category to category
This commit is contained in:
parent
5df82be290
commit
f0816b37bd
@ -6,12 +6,13 @@ import (
|
|||||||
|
|
||||||
func addAnnotationCategoryMig(mg *Migrator) {
|
func addAnnotationCategoryMig(mg *Migrator) {
|
||||||
category := Table{
|
category := Table{
|
||||||
Name: "annotation_category",
|
Name: "category",
|
||||||
Columns: []*Column{
|
Columns: []*Column{
|
||||||
{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
|
{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
|
||||||
{Name: "org_id", Type: DB_BigInt, Nullable: false},
|
{Name: "org_id", Type: DB_BigInt, Nullable: false},
|
||||||
{Name: "user_id", Type: DB_BigInt, Nullable: true},
|
{Name: "user_id", Type: DB_BigInt, Nullable: true},
|
||||||
{Name: "name", Type: DB_Text, Nullable: false},
|
{Name: "name", Type: DB_Text, Nullable: false},
|
||||||
|
{Name: "description", Type: DB_Text, Nullable: false},
|
||||||
},
|
},
|
||||||
Indices: []*Index{
|
Indices: []*Index{
|
||||||
{Cols: []string{"org_id", "name"}, Type: IndexType},
|
{Cols: []string{"org_id", "name"}, Type: IndexType},
|
||||||
@ -19,7 +20,7 @@ func addAnnotationCategoryMig(mg *Migrator) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create table
|
// create table
|
||||||
mg.AddMigration("create annotation_category table", NewAddTableMigration(category))
|
mg.AddMigration("create category table", NewAddTableMigration(category))
|
||||||
|
|
||||||
// create indices
|
// create indices
|
||||||
mg.AddMigration("add index org_id & name", NewAddIndexMigration(category, category.Indices[0]))
|
mg.AddMigration("add index org_id & name", NewAddIndexMigration(category, category.Indices[0]))
|
Loading…
Reference in New Issue
Block a user