Skip to content

Commit

Permalink
feat: add hard index migration for easy migration of data model
Browse files Browse the repository at this point in the history
  • Loading branch information
sbedeau committed Mar 8, 2024
1 parent 30818bd commit 1c87b9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"etl:delete-pipelines": "ts-node src/etl/console.ts delete-pipelines",
"etl:delete-policies": "ts-node src/etl/console.ts delete-policies",
"etl:import": "ts-node src/etl/console.ts import",
"etl:hard-index-migration": "ts-node src/etl/console.ts hard-index-migration",
"etl:meddra-import": "ts-node src/etl/console.ts meddra-import",
"etl:reset-index": "ts-node src/etl/console.ts reset-index",
"etl:translate:everything": "ts-node src/etl/console.ts translate 1970-01-01",
Expand Down
5 changes: 5 additions & 0 deletions src/etl/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ async function console(): Promise<void> {
case 'daily-update':
await etlService.dailyUpdate(startingDate)
break
case 'hard-index-migration':
await etlService.deleteIndex()
await etlService.createIndex()
await etlService.dailyUpdate('1970-01-01')
break
default:
process.exit(1)
}
Expand Down

0 comments on commit 1c87b9e

Please sign in to comment.