[DBIx-Class-Devel] [sql-translator] Fixes Bug #63814: Allow for index creation with USING and WHERE keywords... (#51)

Dagfinn Ilmari Mannsåker notifications at github.com
Wed Jun 24 22:12:17 GMT 2015


> @@ -553,7 +570,10 @@ sub create_index
>      }
>      elsif ( $type eq NORMAL ) {
>          $index_def =
> -            'CREATE INDEX ' . $generator->quote($name) . ' on ' . $generator->quote($table_name) . ' ' . $field_names
> +            'CREATE INDEX ' . $generator->quote($name) . ' on ' . $generator->quote($table_name) .
> +            ($index_using ne '' ? ' ' . $index_using : '') .

If you include the leading space when setting the value above, you can get rid of the ugly conditionals here.

---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/pull/51/files#r33203051
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20150624/6cc179e9/attachment-0001.htm>


More information about the DBIx-Class-Devel mailing list