@cumulus/db 11.1.5 → 12.0.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.
@@ -1,4 +1,4 @@
1
1
  import { Knex } from 'knex';
2
- export declare const up: () => Promise<void>;
2
+ export declare const up: (knex: Knex) => Promise<void>;
3
3
  export declare const down: (knex: Knex) => Promise<void>;
4
4
  //# sourceMappingURL=20220126172008_files_granule_id_index.d.ts.map
@@ -1,20 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.down = exports.up = void 0;
4
- // eslint-disable-next-line arrow-body-style
5
- const up = async () => {
6
- return Promise.resolve();
7
- // **Note** - this migration was removed due to production deployment timeouts.
8
- // A new ticket was added (CUMULUS-2962) to implement this instead. To ensure all deployed
9
- // stacks reach the same migration state, this migration was updated to *not* add the index and
10
- // the next migration in sequence was added to drop the index *if it exists*.
11
- /* await knex.schema.table('files', (table) => {
12
- table.index('granule_cumulus_id');
13
- }); */
4
+ const up = async (knex) => {
5
+ await knex.schema.table('files', (table) => {
6
+ table.index('granule_cumulus_id');
7
+ });
14
8
  };
15
9
  exports.up = up;
16
10
  const down = async (knex) => {
17
- await knex.raw('DROP INDEX IF EXISTS files_granule_cumulus_id_index');
11
+ await knex.schema.table('files', (table) => {
12
+ table.dropIndex('granule_cumulus_id');
13
+ });
18
14
  };
19
15
  exports.down = down;
20
16
  //# sourceMappingURL=20220126172008_files_granule_id_index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/db",
3
- "version": "11.1.5",
3
+ "version": "12.0.2",
4
4
  "description": "Utilities for working with the Cumulus DB",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -26,15 +26,15 @@
26
26
  "timeout": "5m"
27
27
  },
28
28
  "engines": {
29
- "node": ">=12.18.0"
29
+ "node": ">=14.19.1"
30
30
  },
31
31
  "dependencies": {
32
- "@cumulus/aws-client": "11.1.5",
33
- "@cumulus/common": "11.1.5",
34
- "@cumulus/errors": "11.1.5",
35
- "@cumulus/logger": "11.1.5",
36
- "@cumulus/message": "11.1.5",
37
- "@cumulus/types": "11.1.5",
32
+ "@cumulus/aws-client": "12.0.2",
33
+ "@cumulus/common": "12.0.2",
34
+ "@cumulus/errors": "12.0.2",
35
+ "@cumulus/logger": "12.0.2",
36
+ "@cumulus/message": "12.0.2",
37
+ "@cumulus/types": "12.0.2",
38
38
  "crypto-random-string": "^3.2.0",
39
39
  "is-valid-hostname": "1.0.2",
40
40
  "knex": "0.95.15",
@@ -46,5 +46,5 @@
46
46
  "devDependencies": {
47
47
  "@types/uuid": "^8.0.0"
48
48
  },
49
- "gitHead": "fa0ffeeebc417b7d1194769bceca00d3dd700eae"
49
+ "gitHead": "a35accbc4444be2e2b09bd30f3626a0a3780ef22"
50
50
  }
@@ -1,4 +0,0 @@
1
- import { Knex } from 'knex';
2
- export declare const up: (knex: Knex) => Promise<void>;
3
- export declare const down: () => Promise<void>;
4
- //# sourceMappingURL=20220609024044_remove_files_granule_id_index.d.ts.map
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.down = exports.up = void 0;
4
- const up = async (knex) => {
5
- await knex.raw('DROP INDEX IF EXISTS files_granule_cumulus_id_index');
6
- };
7
- exports.up = up;
8
- const down = async () => {
9
- console.log('Warning - this migration cannot be rolled back as 20220126172008_files_granule_id_index.ts was retroactively removed');
10
- };
11
- exports.down = down;
12
- //# sourceMappingURL=20220609024044_remove_files_granule_id_index.js.map
@@ -1,4 +0,0 @@
1
- import { Knex } from 'knex';
2
- export declare const up: (knex: Knex) => Promise<void>;
3
- export declare const down: (knex: Knex) => Promise<void>;
4
- //# sourceMappingURL=20220629181436_add-files-granules-index-rev-2.d.ts.map
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.down = exports.up = void 0;
4
- const up = async (knex) => {
5
- await knex.raw('CREATE INDEX IF NOT EXISTS files_granule_cumulus_id_index ON files (granule_cumulus_id)');
6
- };
7
- exports.up = up;
8
- const down = async (knex) => {
9
- await knex.raw('DROP INDEX IF EXISTS files_granule_cumulus_id_index');
10
- };
11
- exports.down = down;
12
- //# sourceMappingURL=20220629181436_add-files-granules-index-rev-2.js.map