[DBIx-Class-Devel] [sql-translator] add_index expects an array ref not a array ref of stringified array refs... (#24)

Roy Storey notifications at github.com
Tue Dec 18 22:38:27 GMT 2012


That is to say that running 
```bash
sqlt -f DBI --dsn 'dbi:Pg:host=<hostname>;dbname=<dbname>' --db-user '<db-user>' -t MySQL
```
results in 
```sql
CREATE TABLE `migrate_version` (
  `repository_id` text NOT NULL,
  `repository_path` text NULL,
  `version` integer NULL,
  UNIQUE INDEX `migrate_version_pkey` (`ARRAY(0xa923264)`)
);
```

Other parsers effected is unknown and only the PostgreSQL DBI parser was investigated

This patch fixes this ensuring the result is
```sql
CREATE TABLE `migrate_version` (
  `repository_id` text NOT NULL,
  `repository_path` text NULL,
  `version` integer NULL,
  UNIQUE INDEX `migrate_version_pkey` (`repository_id`)
);
```

You can merge this Pull Request by running:

  git pull https://github.com/kiwiroy/sql-translator postgres_indices_fix

Or you can view, comment on it, or merge it online at:

  https://github.com/dbsrgits/sql-translator/pull/24

-- Commit Summary --

  * add_index expects an array ref not a array ref of stringified array refs [ARRAY(0x123456)]

-- File Changes --

M lib/SQL/Translator/Parser/DBI/PostgreSQL.pm (3)

-- Patch Links --

https://github.com/dbsrgits/sql-translator/pull/24.patch
https://github.com/dbsrgits/sql-translator/pull/24.diff


---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/pull/24
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20121218/4416c596/attachment.htm


More information about the DBIx-Class-Devel mailing list