[DBIx-Class-Devel] [sql-translator] Topic/producer postgresql batch alter table (#44)

Peter Mottram notifications at github.com
Fri Aug 22 10:05:52 GMT 2014


This initial version makes sure that drops on old table are handled before table rename and also fixes up rename_field/alter_field so that old field table name is changed to the name of the new table to prevent calls to alter_field from croaking. Test diffs are reordered but are otherwise unchanged.
I've added a test in a separate commit which uses Test::PostgreSQL to demonstrate one specific bug that this PR fixes (GH issue #40).
You can merge this Pull Request by running:

  git pull https://github.com/SysPete/sql-translator topic/producer_postgresql_batch_alter_table

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

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

-- Commit Summary --

  * initial batch_alter_table for ::Producer::PostgreSQL
  * test to demonstrate Pg diff failure with rename_table+rename_field

-- File Changes --

    M lib/SQL/Translator/Producer/PostgreSQL.pm (66)
    M t/30sqlt-new-diff-pgsql.t (24)
    A t/postgresql-rename-table-and-field.t (77)

-- Patch Links --

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

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


More information about the DBIx-Class-Devel mailing list