Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/commands/MigrationGenerateCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class MigrationGenerateCommand implements yargs.CommandModule {
const fileContent = await templater({
name: migrationName,
upQueries: sqlInMemory.upQueries,
downQueries: sqlInMemory.downQueries,
downQueries: sqlInMemory.downQueries.reverse(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it okay to do this in place? Or do we need toReversed()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok since the original code did a reverse(), and unfortunately the TS build for the project is not using a recent enough lib setting to use toReversed() :(

});
const path = process.cwd() + "/" + (directory ? (directory + "/") : "") + filename;
await CommandUtils.createFile(path, fileContent);
Expand Down
Loading