Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension agnostic migrations #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tenorok
Copy link

@tenorok tenorok commented Feb 24, 2020

Currently migrate-mongoose made only for using with migration files with js extension. This changes make possible:

  1. Creating new migrations files with the same extension as template file.
  2. Using extension other than js, like ts for example in development mode (with ts-node for example).

Sorry for irrelevant changes like removing extra spaces (thanks to my editor) – I can reset their if it matters.

@nicmosc
Copy link

nicmosc commented Feb 26, 2020

@tenorok have you tested this with a TS project?

@tenorok
Copy link
Author

tenorok commented Feb 26, 2020

Yes, I faced with a problem of usage migrate-mongoose into typescript-project working on ts-node in development mode and currently use my fork for it.

Migrations continue works well after compiling project into javascript.

@nicmosc
Copy link

nicmosc commented Mar 4, 2020

Tried your fork on our own TS project and it works well!
Though I think it would make more sense if rather than omitting the extension altogether it was kept throughout, I guess by passing the extension variable around. That will make it more explicit and less prone to error.
Do you think you can make those changes? Thanks!

@tenorok
Copy link
Author

tenorok commented Mar 4, 2020

I have not understood what specific problems this will solve? Lack of binding to a specific extension works flexibly with any files, without the need to enter redundant options and hardcode extensions.

I wrote email to @balmasi about this pull request but so far he is silent. Not sure that it’s possible to merge it in at all :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants