Added alter-table support to Producer::SQLServer
authorMichael Conrad <mconrad@intellitree.com>
Thu, 2 Jun 2011 22:22:31 +0000 (18:22 -0400)
committerMichael Conrad <mconrad@intellitree.com>
Thu, 2 Jun 2011 22:23:43 +0000 (18:23 -0400)
commit04627df45cb1fc50763d7e17e8c19c244c21900b
tree8c744a166f2c2278c64d97f8d4ea8d06ed064902
parent5e4917c657ee6ca5c7dbb4f36f58bd4338d5915c
Added alter-table support to Producer::SQLServer

I refactored most of the existing code into a method 'build_field_clause'.
I added some basic support for translation from MySQL blob types.
I added some logic to calculate appropriate blob size parameters.
I wrote new 'alter' methods for add/drop of indexes and constraints.
I rearranged the utility function for renaming constraints so that it is a separate operation from quoting.
All identifiers are quoted by default, now.

I can't vouch for completeness or correctness, but it works for quite a few more cases than previously.
lib/SQL/Translator/Producer/SQLServer.pm [changed mode: 0644->0755]