@cumulus/db 11.1.1 → 13.0.0

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/dist/config.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import AWS from 'aws-sdk';
3
4
  import { Knex } from 'knex';
4
5
  export declare const localStackConnectionEnv: {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import AWS from 'aws-sdk';
3
4
  import { Knex } from 'knex';
4
5
  import Logger from '@cumulus/logger';
@@ -34,7 +34,7 @@ export declare const getExecutionInfoByGranuleCumulusId: ({ knexOrTransaction, g
34
34
  * @param {number} limit - limit to number of executions to query
35
35
  * @returns {Promise<ArnRecord[]>} - Array of arn objects with the most recent first.
36
36
  */
37
- export declare const getExecutionArnsByGranuleCumulusId: (knexOrTransaction: Knex | Knex.Transaction, granuleCumulusId: Number, limit?: number | undefined) => Promise<ArnRecord[]>;
37
+ export declare const getExecutionArnsByGranuleCumulusId: (knexOrTransaction: Knex | Knex.Transaction, granuleCumulusId: Number, limit?: number) => Promise<ArnRecord[]>;
38
38
  /**
39
39
  * Returns a list of executionArns sorted by most recent first, for an input
40
40
  * list of granuleIds and workflowNames.
@@ -16,7 +16,7 @@ export declare const getGranuleCollectionId: (knexOrTransaction: Knex | Knex.Tra
16
16
  * Granules/executions PG model class instance
17
17
  * @returns {Promise<PostgresGranuleRecord[]>}
18
18
  */
19
- export declare const upsertGranuleWithExecutionJoinRecord: (knexTransaction: Knex.Transaction, granule: PostgresGranule, executionCumulusId?: number | undefined, granulePgModel?: GranulePgModel, granulesExecutionsPgModel?: GranulesExecutionsPgModel) => Promise<PostgresGranuleRecord[]>;
19
+ export declare const upsertGranuleWithExecutionJoinRecord: (knexTransaction: Knex.Transaction, granule: PostgresGranule, executionCumulusId?: number, granulePgModel?: GranulePgModel, granulesExecutionsPgModel?: GranulesExecutionsPgModel) => Promise<PostgresGranuleRecord[]>;
20
20
  /**
21
21
  * Get cumulus IDs for list of granules
22
22
  *
@@ -76,5 +76,5 @@ export declare const getGranulesByApiPropertiesQuery: (knex: Knex, { collectionI
76
76
  providerNames?: string[] | undefined;
77
77
  updatedAtRange?: UpdatedAtRange | undefined;
78
78
  status?: string | undefined;
79
- }, sortByFields?: string | string[] | undefined) => Knex.QueryBuilder;
79
+ }, sortByFields?: string | string[]) => Knex.QueryBuilder;
80
80
  //# sourceMappingURL=granule.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { Knex } from 'knex';
2
- export declare const up: (knex: Knex) => Promise<void>;
2
+ export declare const up: () => Promise<void>;
3
3
  export declare const down: (knex: Knex) => Promise<void>;
4
4
  //# sourceMappingURL=20220126172008_files_granule_id_index.d.ts.map
@@ -1,16 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.down = exports.up = void 0;
4
- const up = async (knex) => {
5
- await knex.schema.table('files', (table) => {
6
- table.index('granule_cumulus_id');
7
- });
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
+ }); */
8
14
  };
9
15
  exports.up = up;
10
16
  const down = async (knex) => {
11
- await knex.schema.table('files', (table) => {
12
- table.dropIndex('granule_cumulus_id');
13
- });
17
+ await knex.raw('DROP INDEX IF EXISTS files_granule_cumulus_id_index');
14
18
  };
15
19
  exports.down = down;
16
20
  //# sourceMappingURL=20220126172008_files_granule_id_index.js.map
@@ -0,0 +1,4 @@
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
@@ -0,0 +1,12 @@
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/db",
3
- "version": "11.1.1",
3
+ "version": "13.0.0",
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.1",
33
- "@cumulus/common": "11.1.1",
34
- "@cumulus/errors": "11.1.1",
35
- "@cumulus/logger": "11.1.1",
36
- "@cumulus/message": "11.1.1",
37
- "@cumulus/types": "11.1.1",
32
+ "@cumulus/aws-client": "13.0.0",
33
+ "@cumulus/common": "13.0.0",
34
+ "@cumulus/errors": "13.0.0",
35
+ "@cumulus/logger": "13.0.0",
36
+ "@cumulus/message": "13.0.0",
37
+ "@cumulus/types": "13.0.0",
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": "07fe682da23821434372759fb1948b081da429b5"
49
+ "gitHead": "ba43ea3bfdfcacfff052770ed2fd357eb9dadb58"
50
50
  }