[DBIx-Class-Devel] [dbsrgits/dbix-class-schema-loader] Fix timestamp defaults in MariaDB 10.2.3 and later (#24)

Dave Lambley notifications at github.com
Mon Jan 18 18:49:32 GMT 2021


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 .
You can view, comment on, or merge this pull request online at:

  https://github.com/dbsrgits/dbix-class-schema-loader/pull/24

-- Commit Summary --

  * Handle current_timestamp() from MariaDB DESCRIBE
  * Be more specific in regex
  * Permit DATETIME types to have current_timestamp()

-- File Changes --

    M lib/DBIx/Class/Schema/Loader/DBI/mysql.pm (7)
    M t/10_02mysql_common.t (4)

-- Patch Links --

https://github.com/dbsrgits/dbix-class-schema-loader/pull/24.patch
https://github.com/dbsrgits/dbix-class-schema-loader/pull/24.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class-schema-loader/pull/24
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20210118/64b2e0b5/attachment.htm>


More information about the DBIx-Class-Devel mailing list