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

migrations timestamp bug #360

Closed
Spoki4 opened this issue Mar 22, 2017 · 4 comments
Closed

migrations timestamp bug #360

Spoki4 opened this issue Mar 22, 2017 · 4 comments

Comments

@Spoki4
Copy link

Spoki4 commented Mar 22, 2017

Hi, u use in migrations table only 10 numbers.

timestamp real_timestamp
7111386161 1487111386161
7497664672 1487497664672
7802041914 1487802041914
7932192510 1487932192510
7943972051 1487943972051
9413161823 1489413161823
9519798663 1489519798663
9550577803 1489550577803

And now I try add new migrations with timestamp 1490149967376. 1490149967376 > 1489550577803 BUT
0149967376 < 9550577803. I got an error:

Error: New migration found: CreateOfferTable1490149967376, however this migration's timestamp is not valid. Migration's timestamp should not be older then migrations already executed in the database.
    at D:\Repositories\palport\src\migration\MigrationExecutor.ts:63:23
    at Array.filter (native)
    at MigrationExecutor.<anonymous> (D:\Repositories\palport\src\migration\MigrationExecutor.ts:55:49)
    at step (D:\Repositories\palport\node_modules\typeorm\migration\MigrationExecutor.js:32:23)
    at Object.next (D:\Repositories\palport\node_modules\typeorm\migration\MigrationExecutor.js:13:53)
    at fulfilled (D:\Repositories\palport\node_modules\typeorm\migration\MigrationExecutor.js:4:58)
    at process._tickDomainCallback (internal/process/next_tick.js:129:7)
@pleerock
Copy link
Member

As I understood migrations are being generated properly, however when they are executed the timestamp saved in the database table is wrong. Am I right?

@Spoki4
Copy link
Author

Spoki4 commented Mar 22, 2017

yes, in database migration timestamp cuts the first 3 digits.

@pleerock
Copy link
Member

fixed and released in 0.0.10. Please check that.

@valVk
Copy link

valVk commented Mar 29, 2017

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

No branches or pull requests

3 participants