You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[X] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
When changing the column name in the database for an @UpdateDateColumn, it would create the following query:
ALTER TABLE *** CHANGE updated_at updated_at2 datetime(6) NOT NULL DEFAULT 'CURRENT_TIMESTAMP(6)'
But there is a fault in the query for mysql, the 'CURRENT_TIMESTAMP(6)' should be without brackets, like so: ALTER TABLE *** CHANGE updated_at updated_at2 datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
Otherwise the following error rises: ALTER TABLE *** CHANGE updated_at updated_at2 datetime(6) NOT NULL DEFAULT 'CURRENT_TIMESTAMP(6)' Error Code: 1067. Invalid default value for 'updated_at2'
The text was updated successfully, but these errors were encountered:
…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:
[X]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Steps to reproduce or a small repository showing the problem:
When changing the column name in the database for an @UpdateDateColumn, it would create the following query:
ALTER TABLE *** CHANGE updated_at updated_at2 datetime(6) NOT NULL DEFAULT 'CURRENT_TIMESTAMP(6)'
But there is a fault in the query for mysql, the 'CURRENT_TIMESTAMP(6)' should be without brackets, like so:
ALTER TABLE *** CHANGE updated_at updated_at2 datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
Otherwise the following error rises:
ALTER TABLE *** CHANGE updated_at updated_at2 datetime(6) NOT NULL DEFAULT 'CURRENT_TIMESTAMP(6)' Error Code: 1067. Invalid default value for 'updated_at2'
The text was updated successfully, but these errors were encountered: