strip schema name from ADD CONSTRAINT / CREATE INDEX
authorFitz Elliott <felliott@fiskur.org>
Thu, 26 Jun 2014 19:12:06 +0000 (15:12 -0400)
committerPeter Rabbitson <ribasushi@cpan.org>
Thu, 31 Jul 2014 10:59:14 +0000 (12:59 +0200)
commit0e14d9181e757764af264ea104ae566fab8dcdb4
tree180dc65a46379e489a31717dfbe37c6537854e01
parentba0e8d1c2554716b2fef6dc00672c5eb8aaab368
strip schema name from ADD CONSTRAINT / CREATE INDEX

 * Pg tablenames may have a schema prefix.  This leads to invalid ADD
   CONSTRAINT / CREATE INDEX statments being generated by ->deploy(),
   since constraint and index names may not have a period in them. This
   patch strips the schema part from the table name when constructing
   unique index and constraint names.  The fix was taken from
   ribasushi's email to the mailing list:

   http://lists.scsys.co.uk/pipermail/dbix-class/2013-February/011141.html
Changes
lib/DBIx/Class/ResultSource.pm
lib/SQL/Translator/Parser/DBIx/Class.pm
t/99dbic_sqlt_parser.t