Correlations: Add organization id (#72258)

* Add org_id to correlations

* Add tests

* Allow org_id to be null in case org_id=0 is used

* Create organization to ensure stable id is generated

* Fix linting

* Ensure backwards compatibility

* Add deprecation information

* Migrate correlations indices

* Default org_id when migrating

* Remove redundant default

* Make PK non-nullable
This commit is contained in:
Piotr Jamróz
2023-08-24 09:39:30 +02:00
committed by GitHub
parent 9b891480d6
commit b30e0aa5aa
11 changed files with 153 additions and 7 deletions
@@ -0,0 +1,6 @@
apiVersion: 1
datasources:
- name: Foo
orgId: 1
type: graphite
@@ -0,0 +1,15 @@
apiVersion: 1
deleteDatasources:
- name: Foo
orgId: 2
datasources:
- name: Foo
uid: foo
orgId: 2
type: graphite
correlations:
- targetUID: foo
label: self correlation
description: a description
@@ -0,0 +1,11 @@
apiVersion: 1
datasources:
- name: Foo
uid: foo
orgId: 3
type: graphite
correlations:
- targetUID: foo
label: self correlation
description: a description