<!doctype html>
<html>
 <head> 
  <meta charset="UTF-8"> 
 </head>
 <body>
  <div style="" class="default-style">
   Hello,
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   The database I've been working with exposes two cases where a schema cannot be round-tripped through DBIx::Class::Schema::Loader. I have fixes for both which have been sitting around for some time. Is there anything I can do to help get these fixes released?
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   1) "current_timestamp" defaults cannot be parsed in MariaDB.
   <br>
  </div>
  <div style="" class="default-style">
   <a href="https://github.com/dbsrgits/dbix-class-schema-loader/pull/24">https://github.com/dbsrgits/dbix-class-schema-loader/pull/24 </a>(Based on ASHMEMA's PR from a year ago.)
   <br>
  </div>
  <div style="" class="default-style">
   <a href="https://rt.cpan.org/Ticket/Display.html?id=134064">https://rt.cpan.org/Ticket/Display.html?id=134064</a>
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   MariaDB changed their output format five years ago. DBIx::Class::Schema::Loader needs to be updated to cope.
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   2) SQL::Translator generates an invalid CREATE TABLE.
   <br>
  </div>
  <div style="" class="default-style">
   <a href="https://github.com/dbsrgits/sql-translator/pull/121">https://github.com/dbsrgits/sql-translator/pull/121</a>
   <br>
  </div>
  <div style="" class="default-style">
   <a href="https://rt.cpan.org/Ticket/Display.html?id=134065">https://rt.cpan.org/Ticket/Display.html?id=134065</a>
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   When a table has a foreign key, SQL::Translator automatically adds an INDEX for the field. If you already have a UNIQUE KEY named after this field, you end up with two indices with the same name. MySQL and MariaDB won't accept this.
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   The change I have prevents the additional INDEX being created if one already exists by virtue of being on the left hand side of a UNIQUE KEY.
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   We *could* omit the additional index entirely when generating output for recent MariaDBs (and maybe MySQL) as it implicitly creates the index if necessary. However, it seems desirable to avoid version specific behaviour.
   <br>
  </div>
  <div style="" class="default-style">
   <br>
  </div>
  <div style="" class="default-style">
   Cheers,
   <br>
  </div>
  <div style="" class="default-style">
   Dave
   <br>
  </div>
 </body>
</html>