@socialgouv/matomo-postgres 2.2.0-beta.2 → 2.2.0-beta.3
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/bin/index.js +2 -2
- package/dist/migrate-latest.js +1 -2
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { db } from '../dist/db.js'
|
|
4
4
|
import run from '../dist/index.js'
|
|
5
|
-
import
|
|
5
|
+
import { startMigration } from '../dist/migrate-latest.js'
|
|
6
6
|
|
|
7
7
|
async function start(date) {
|
|
8
8
|
console.log(`\nRunning migrations\n`)
|
|
9
|
-
await
|
|
9
|
+
await startMigration()
|
|
10
10
|
console.log(`\nStarting import\n`)
|
|
11
11
|
await run(date)
|
|
12
12
|
db.destroy()
|
package/dist/migrate-latest.js
CHANGED
|
@@ -50,10 +50,9 @@ function migrateToLatest() {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
export default migrateToLatest;
|
|
53
|
-
function
|
|
53
|
+
export function startMigration() {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
55
|
yield migrateToLatest();
|
|
56
56
|
yield db.destroy();
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
start();
|
package/package.json
CHANGED