Skip to content

Commit efbead1

Browse files
committed
Unescape quotes from default values
1 parent a451b28 commit efbead1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/sqlserver/schema_statements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def column_definitions(table_name)
256256
nil
257257
else
258258
match_data = ci[:default_value].match(/\A\(+N?'?(.*?)'?\)+\Z/m)
259-
match_data ? match_data[1] : nil
259+
match_data ? match_data[1].gsub("''", "'") : nil
260260
end
261261
ci[:null] = ci[:is_nullable].to_i == 1
262262
ci.delete(:is_nullable)

0 commit comments

Comments
 (0)