Permalink
Browse files

Fix code formatting and whitespace

  • Loading branch information...
1 parent bc34b60 commit 7cd5533f4cc35d7e8ba3c15aa3b278d1cd304b01 @dkubb dkubb committed Apr 7, 2012
@@ -241,6 +241,7 @@ def property_schema_statement(connection, schema)
statement << " DEFAULT #{connection.quote_value(schema[:default])}" if schema.key?(:default)
statement << ' NOT NULL' unless schema[:allow_nil]
+
statement
end
@@ -45,7 +45,7 @@ def rename_column_type_statement(table_name, old_col, new_col)
column_info = select("SHOW COLUMNS FROM #{quote_name(table_name)} LIKE ?", old_col).first
column_options = {
:name => column_info.field,
- :primitive => column_info.type
+ :primitive => column_info.type,
}
if column_info.null == 'YES'
@@ -61,10 +61,10 @@ def rename_column_type_statement(table_name, old_col, new_col)
end
column = with_connection do |connection|
- property_schema_statement(connection,column_options)
- end
+ property_schema_statement(connection, column_options)
+ end
- column_name, column_definition = column.split(' ',2)
+ column_name, column_definition = column.split(' ', 2)
"ALTER TABLE #{quote_name(table_name)} CHANGE #{quote_name(old_col)} #{quote_name(new_col)} #{column_definition}"
end
@@ -27,15 +27,14 @@ def supports_serial?
true
end
- def change_column_type_statement(*args)
+ def change_column_type_statement(*)
raise NotImplementedError
end
- def rename_column_type_statement(table_name, old_col, new_col)
+ def rename_column_type_statement(*)
raise NotImplementedError
end
-
class Table < SQL::Table
def initialize(adapter, table_name)
@columns = []
@@ -131,7 +131,6 @@
describe DataMapper::Migration, "#modify_table helper" do
before do
@migration = DataMapper::Migration.new(1, :create_people_table, :verbose => false) { }
-
end
it "should have a #modify_table helper" do

0 comments on commit 7cd5533

Please sign in to comment.