[DBIx-Class-Devel] [dbsrgits/sql-translator] Fixed a terrible diff issue case of PostgreSQL (#91)
K
notifications at github.com
Thu May 18 14:44:01 GMT 2017
## Why terrible?
- It outputs syntax that will result in an error when executed.
`ALTER TABLE tablename ALTER colname TYPE serial;`
- When parsing from DBI, unexpected types are returned
- Similarly, unexpected sizes are returned
- There is no type match for time
## What I did?
- I rewrote SQL to solve the above problem.
- Added a dedicated parser statement for `smallserial`.
- When type like serial, we modified it to use `CREATE SEQUENCE` instead of `ALTER`.
Best regard 👍
You can view, comment on, or merge this pull request online at:
https://github.com/dbsrgits/sql-translator/pull/91
-- Commit Summary --
* Fixed issue `ERROR: type "serial" does not exist`
* Modified tests for postgres
* Modified producer to generate time or timestamp
* Fixed to parse from DBI using PostgreSQL
-- File Changes --
M lib/SQL/Translator/Parser/DBI/PostgreSQL.pm (26)
M lib/SQL/Translator/Parser/PostgreSQL.pm (9)
M lib/SQL/Translator/Producer/PostgreSQL.pm (87)
M t/30sqlt-new-diff-pgsql.t (16)
M t/47postgres-producer.t (4)
M t/66-postgres-dbi-parser.t (5)
-- Patch Links --
https://github.com/dbsrgits/sql-translator/pull/91.patch
https://github.com/dbsrgits/sql-translator/pull/91.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/sql-translator/pull/91
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20170518/5c12a21b/attachment.htm>
More information about the DBIx-Class-Devel
mailing list