-
+* Apply quotes to fix tables that are reserved words, DBI::SQLServer (Jonathan C. Otsuka)
* De-linkify XML namespace in docs (RT#81838)
* Allow both single and double quotes for values in MySQL parser
* Fix diff for altering two things per column - add ; at the end
# add in primary key
my $h = $dbh->selectall_hashref("sp_pkeys
-$table_info->{TABLE_NAME}", 'COLUMN_NAME');
+[$table_info->{TABLE_NAME}]", 'COLUMN_NAME');
if (scalar keys %{$h} >= 1) {
my @c = map {
$_->{COLUMN_NAME}
# add in foreign keys
$h = $dbh->selectall_hashref("sp_fkeys NULL,
-\@fktable_name = '$table_info->{TABLE_NAME}'", 'FK_NAME');
+\@fktable_name = '[$table_info->{TABLE_NAME}]'", 'FK_NAME');
foreach my $fk ( values %{$h} ) {
my $constraint = $table->add_constraint( name => $fk->{FK_NAME},
fields => [$fk->{FKCOLUMN_NAME}],
if (defined($stuff->{indexes}->{$table_info->{TABLE_NAME}})){
my $h = $dbh->selectall_hashref("sp_helpindex
-$table_info->{TABLE_NAME}", 'INDEX_NAME');
+[$table_info->{TABLE_NAME}]", 'INDEX_NAME');
foreach (values %{$h}) {
my $fields = $_->{'INDEX_KEYS'};
$fields =~ s/\s*//g;
# add in primary key
my $h = $dbh->selectall_hashref("sp_pkeys
-$table_info->{TABLE_NAME}", 'COLUMN_NAME');
+[$table_info->{TABLE_NAME}]", 'COLUMN_NAME');
if (scalar keys %{$h} > 1) {
my @c = map {
$_->{COLUMN_NAME}
if (defined($stuff->{indexes}->{$table_info->{TABLE_NAME}})){
my $h = $dbh->selectall_hashref("sp_helpindex
-$table_info->{TABLE_NAME}", 'INDEX_NAME');
+[$table_info->{TABLE_NAME}]", 'INDEX_NAME');
foreach (values %{$h}) {
my $fields = $_->{'INDEX_KEYS'};
$fields =~ s/\s*//g;