[DBIx-Class-Devel] [sql-translator] ::Diff tries to modify old table after table rename for PK col name change (#40)

Peter Mottram notifications at github.com
Mon Aug 4 16:17:15 GMT 2014


https://github.com/dbsrgits/sql-translator/blob/master/lib/SQL/Translator/Diff.pm#L237 is where the madness starts. If a renamed table also has a renamed field then this is the wrong way round since field and possible constraints (pk/unique/...) must be renamed before the table or else you end up with nonsense like:
```
ALTER TABLE foos RENAME TO trees;
ALTER TABLE foos DROP CONSTRAINT foos_pkey;
```


---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/issues/40#issuecomment-51081691
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20140804/d9141fc5/attachment.htm>


More information about the DBIx-Class-Devel mailing list