@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 +1 -0
- package/dist/connection.d.ts +1 -0
- package/dist/lib/execution.d.ts +1 -1
- package/dist/lib/granule.d.ts +2 -2
- package/dist/migrations/20220126172008_files_granule_id_index.d.ts +1 -1
- package/dist/migrations/20220126172008_files_granule_id_index.js +11 -7
- package/dist/migrations/20220609024044_remove_files_granule_id_index.d.ts +4 -0
- package/dist/migrations/20220609024044_remove_files_granule_id_index.js +12 -0
- package/package.json +9 -9
package/dist/config.d.ts
CHANGED
package/dist/connection.d.ts
CHANGED
package/dist/lib/execution.d.ts
CHANGED
|
@@ -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
|
|
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.
|
package/dist/lib/granule.d.ts
CHANGED
|
@@ -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
|
|
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[]
|
|
79
|
+
}, sortByFields?: string | string[]) => Knex.QueryBuilder;
|
|
80
80
|
//# sourceMappingURL=granule.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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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.
|
|
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,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": "
|
|
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": ">=
|
|
29
|
+
"node": ">=14.19.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cumulus/aws-client": "
|
|
33
|
-
"@cumulus/common": "
|
|
34
|
-
"@cumulus/errors": "
|
|
35
|
-
"@cumulus/logger": "
|
|
36
|
-
"@cumulus/message": "
|
|
37
|
-
"@cumulus/types": "
|
|
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": "
|
|
49
|
+
"gitHead": "ba43ea3bfdfcacfff052770ed2fd357eb9dadb58"
|
|
50
50
|
}
|