On Sunday, February 4, 2018 at 5:32:47 PM UTC-8, Tom Wardrop wrote:
> Not sure if this a bug, but check the following:
> # Adds column "TEST" to "RESOURCE" table.
> add_column :resource, :test, :bit
> # Renames "TEST" to "another_test" in lower case
> rename_column :resource, :test, :another_test
> This is using the TinyTDS adapter. Adding columns automatically converts
> column names to uppercase, where as renaming does not.
Microsoft SQL Server doesn't actually have syntax support for renaming
columns, you have to call the sp_rename stored procedure, and you pass that
procedure a string, not an identifier. I'm not sure what the quoting rules
are regarding that string, I'll have to experiment tomorrow and see if
there is a bug. Considering that MSSQL can pass the related specs, it
seems unlikely there is a bug, unless you have noticed an actual problem
and not just worried that the generated SQL looks odd.
You could try the following, but I have no idea if it works as I haven't
diff --git a/lib/sequel/adapters/shared/mssql.rb
index 68dd4d1fd..8365701fa 100644
@@ -260,7 +260,7 @@ module Sequel
add_drop_default_constraint_sql(sqls, table, op[:name])
sqls << super
sqls = 
if sch = schema(table)
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.