Skip to content

Commit

Permalink
Fixed a SQL syntax error in the monkey patch
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.typosphere.org/typo/trunk@1051 820eb932-12ee-0310-9ca8-eeb645f39767
  • Loading branch information
pdcawley committed May 13, 2006
1 parent 9f9cdd0 commit e9f6b3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails_patch/active_record.rb
Expand Up @@ -12,7 +12,7 @@ class MysqlAdapter
def change_column(table_name, column_name, type, options ={ }) #:nodoc:
if options[:default].nil?
options[:default] =
select_one("SHOW COLUMNS FROM #{table_name} LIKE #{column_name}")["Default"]
select_one("SHOW COLUMNS FROM #{table_name} LIKE '#{column_name}'")["Default"]
end
change_column_sql = "ALTER TABLE #{table_name} CHANGE #{column_name} #{column_name} #{type_to_sql(type, options[:limit])}"
add_column_options!(change_column_sql, options)
Expand Down

0 comments on commit e9f6b3b

Please sign in to comment.