mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 06:12:20 +08:00
LibraryElements: Enables creating library elements with specific UID (#39019)
* LibraryPanels: Enables create/update library panels with specific UID * Chore: added check for uid length after PR comments * Refactor: creates IsShortUIDTooLong function * Refactor: adds UID to PATCH endpoint * Refactor: clarifies the patch code * Refactor: changes after PR comments
This commit is contained in:
@ -50,4 +50,8 @@ func addLibraryElementsMigrations(mg *migrator.Migrator) {
|
||||
|
||||
mg.AddMigration("create "+models.LibraryElementConnectionTableName+" table v1", migrator.NewAddTableMigration(libraryElementConnectionV1))
|
||||
mg.AddMigration("add index "+models.LibraryElementConnectionTableName+" element_id-kind-connection_id", migrator.NewAddIndexMigration(libraryElementConnectionV1, libraryElementConnectionV1.Indices[0]))
|
||||
|
||||
mg.AddMigration("add unique index library_element org_id_uid", migrator.NewAddIndexMigration(libraryElementsV1, &migrator.Index{
|
||||
Cols: []string{"org_id", "uid"}, Type: migrator.UniqueIndex,
|
||||
}))
|
||||
}
|
||||
|
Reference in New Issue
Block a user