@backstage/plugin-catalog-backend 1.3.1-next.1 → 1.3.1-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.3.1-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 059ae348b4: Use the non-deprecated form of table.unique in knex
8
+
3
9
  ## 1.3.1-next.1
4
10
 
5
11
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.3.1-next.1",
3
+ "version": "1.3.1-next.2",
4
4
  "main": "../dist/index.cjs.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
@@ -92,7 +92,9 @@ exports.up = async function up(knex) {
92
92
  })
93
93
  .alterTable('entities', table => {
94
94
  // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta
95
- table.unique(['kind', 'name', 'namespace'], 'entities_unique_name');
95
+ table.unique(['kind', 'name', 'namespace'], {
96
+ indexName: 'entities_unique_name',
97
+ });
96
98
  })
97
99
  //
98
100
  // entities_search
@@ -89,7 +89,9 @@ exports.up = async function up(knex) {
89
89
  })
90
90
  .alterTable('entities', table => {
91
91
  // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta
92
- table.unique(['kind', 'name', 'namespace'], 'entities_unique_name');
92
+ table.unique(['kind', 'name', 'namespace'], {
93
+ indexName: 'entities_unique_name',
94
+ });
93
95
  });
94
96
 
95
97
  await knex.schema.raw(`INSERT INTO entities SELECT * FROM tmp_entities`);
@@ -199,7 +201,9 @@ exports.down = async function down(knex) {
199
201
  })
200
202
  .alterTable('entities', table => {
201
203
  // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta
202
- table.unique(['kind', 'name', 'namespace'], 'entities_unique_name');
204
+ table.unique(['kind', 'name', 'namespace'], {
205
+ indexName: 'entities_unique_name',
206
+ });
203
207
  });
204
208
 
205
209
  await knex.schema.raw(`INSERT INTO entities SELECT * FROM tmp_entities`);
@@ -39,7 +39,7 @@ exports.up = async function up(knex) {
39
39
 
40
40
  await knex.schema.alterTable('entities', table => {
41
41
  // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta
42
- table.unique(['full_name'], 'entities_unique_full_name');
42
+ table.unique(['full_name'], { indexName: 'entities_unique_full_name' });
43
43
  table.dropUnique([], 'entities_unique_name');
44
44
  });
45
45
  };
@@ -51,7 +51,9 @@ exports.down = async function down(knex) {
51
51
  await knex.schema.alterTable('entities', table => {
52
52
  // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta
53
53
  table.dropUnique([], 'entities_unique_full_name');
54
- table.unique(['kind', 'namespace', 'name'], 'entities_unique_name');
54
+ table.unique(['kind', 'namespace', 'name'], {
55
+ indexName: 'entities_unique_name',
56
+ });
55
57
  });
56
58
 
57
59
  await knex.schema.alterTable('entities_search', table => {
@@ -65,7 +65,9 @@ exports.up = async function up(knex) {
65
65
  .dateTime('last_discovery_at') // TODO: timezone or change to epoch-millis or similar
66
66
  .notNullable()
67
67
  .comment('The last timestamp of which this entity was discovered');
68
- table.unique(['entity_ref'], 'refresh_state_entity_ref_uniq');
68
+ table.unique(['entity_ref'], {
69
+ indexName: 'refresh_state_entity_ref_uniq',
70
+ });
69
71
  table.index('entity_id', 'refresh_state_entity_id_idx');
70
72
  table.index('entity_ref', 'refresh_state_entity_ref_idx');
71
73
  table.index('next_update_at', 'refresh_state_next_update_at_idx');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
3
  "description": "The Backstage backend plugin that provides the Backstage catalog",
4
- "version": "1.3.1-next.1",
4
+ "version": "1.3.1-next.2",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "@backstage/backend-test-utils": "^0.1.27-next.0",
74
- "@backstage/cli": "^0.18.1-next.0",
74
+ "@backstage/cli": "^0.18.1-next.1",
75
75
  "@backstage/plugin-permission-common": "^0.6.3",
76
76
  "@backstage/plugin-search-backend-node": "1.0.1-next.0",
77
77
  "@types/core-js": "^2.5.4",
@@ -92,5 +92,5 @@
92
92
  "config.d.ts"
93
93
  ],
94
94
  "configSchema": "config.d.ts",
95
- "gitHead": "62bee85ae500414d27d7828288786de8f4816ef8"
95
+ "gitHead": "9b7d23351cdbe29fb16060f6f9e8442932d3fa29"
96
96
  }