File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/resources/assets/RDS/migrator Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11"use strict" ;
22
33import path from "path" ;
4- import { Kysely , Migrator , NO_MIGRATIONS } from "kysely" ;
4+ import { Kysely , Migrator , NO_MIGRATIONS , FileMigrationProvider } from "kysely" ;
55import { DataApiDialect } from "kysely-data-api" ;
66import RDSDataService from "aws-sdk/clients/rdsdataservice" ;
77import url from "url" ;
@@ -21,9 +21,11 @@ export async function handler(evt) {
2121
2222 const migrator = new Migrator ( {
2323 db,
24- provider : new DynamicFileMigrationProvider (
25- path . resolve ( process . env . RDS_MIGRATIONS_PATH )
26- ) ,
24+ provider : process . env . LAMBDA_TASK_ROOT
25+ ? new FileMigrationProvider ( path . resolve ( process . env . RDS_MIGRATIONS_PATH ) )
26+ : new DynamicFileMigrationProvider (
27+ path . resolve ( process . env . RDS_MIGRATIONS_PATH )
28+ ) ,
2729 } ) ;
2830
2931 if ( ! evt . type || evt . type === "latest" ) {
You can’t perform that action at this time.
0 commit comments