-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Timestamp should be in filename for migration:create command #8794
Comments
I've encountered this too. |
Same for me. In addition documentation under https://typeorm.io/migrations states to create a migration via: I was also confused with the |
After looking at it again, I realize the The snippet I proposed above appears to be working locally for me. I just compared the two commands files in the source MigrationCreate You can see the handler functions are different, specially the |
I am getting error
My DataSource file look like this
can anyone help me out with this ?? Thanks in advance. |
Issue Description
The timestamp is not appended to the filename when using
typeorm migration:create <path>
Expected Behavior
When the script is ran
Output a file
./src/migrations/123343242-test.ts
Actual Behavior
When the script is ran
File output is:
./src/migrations/test.ts
Steps to Reproduce
Run the migration:create command from anywhere typeorm is installed
My Environment
Additional Context
I think the solution is fairly simple - but I also don't understand what the timestamp argument is doing.
I have tried running commands with argument
and the output is not changed.
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
I posted an updated snippet below, this is working locally. I'm not too familiar with writing/running tests to propose a PR
MigrationCreateCommand.ts
change the handler functionThe text was updated successfully, but these errors were encountered: