dbsrgits / dbix-class-schema-loader

Official GitHub remote for git.shadowcat.co.uk DBIx-Class-Schema-Loader.git
http://dbix-class.org/
11 stars 34 forks source link

Fix timestamp defaults in MariaDB 10.2.3 and later #24

Open davel opened 3 years ago

davel commented 3 years ago

This patch handles a behaviour change preventing schemas using DEFAULT current_timestamp() from being correctly imported from MariaDB.

MariaDB made a change about five years ago which causes it to say current_timestamp() rather than current_timestamp when outputting schema. This was quite deliberate, see https://jira.mariadb.org/browse/MDEV-13377 and https://github.com/MariaDB/server/commit/a411d7f4f670c24b43b50f7d2a1129e10218f4a7

This builds on @mrenvoize's unmerged https://github.com/dbsrgits/dbix-class-schema-loader/pull/23 .