-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Migration keeps changing @CreateDateColumn/@UpdateDateColumn timestamp column to same definition #3991
Comments
same issue. also index .
|
EDIT: Probably a duplicate of #2737. Same problem, happens also with foreign keys.
|
@sandokanelcojo can you confirm the relevant fk in the I wrote about the problem with createDate/updateDate in #2737, looks like a recent version of MariaDB started returning default value |
Any progress on this? Really annoying thing. |
fixed precision in datetime functions for MySQL/MariaDB; improved #3991 test for MySQL/MariaDB;
improved #3991 test for PostgreSQl;
…ies during synchronization (#7517) * fix #3991 * fix #3991 * improved test for #2737; fixed remaining issues in #2737; * fix #6412 * added test for #4281 and #4658 * fixed `NOW()` function usage in MySQL/MariaDB; fixed precision in datetime functions for MySQL/MariaDB; improved #3991 test for MySQL/MariaDB; * added test for #2333 * added test for #7381 * added "remove" operation check in #4658 test * fixed precision in datetime functions for PostgreSQl; improved #3991 test for PostgreSQl; * improved #3991 test for CockroachDB; * improved #3991 test for Sqlite; * improved #3991 test for Oracle and SQLServer;
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[x]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[ ]
latest
[ ]
@next
[x]
0.2.16
(or put your version here)Steps to reproduce or a small repository showing the problem:
I have a bunch of tables with my create- and updateTimestamp columns defined as follows:
When I run
migration:generate
, typeorm is repeatedly (even after running it) generating a migration file that changes the column definition to the same definition it already has. You can tell because theup
anddown
methods do the exact same thing. I would expect the migration to be empty.Example migration file
I can work around it by defining my create- and updateTimestamp columns as follows
But it's a shame that it's not working with the
@CreateDateColumn
and@UpdateDateColumn
decorators.The text was updated successfully, but these errors were encountered: