#549 ✓resolved
Betelgeuse

Migration generator generates migrations with trailing white space

Reported by Betelgeuse | November 19th, 2009 @ 09:59 PM

git diff doesn't like trailing white space. Here's a couple of places I have noticed railing white space

Between two create_table calls:

+class HoboMigration4 < ActiveRecord::Migration
+  def self.up
+    create_table :model3s do |t|
+      t.string   :name
+      t.datetime :created_at
+      t.datetime :updated_at
+    end
+
+    create_table :model2s do |t|
+      t.string   :name
+      t.datetime :created_at
+      t.datetime :updated_at
+    end
+  end

Between change_column calls for two different models:

+class HoboMigration5 < ActiveRecord::Migration
+  def self.up
+    change_column :model3s, :name, :string, :limit => 255, :null => false
+
+    change_column :model2s, :name, :string, :limit => 255, :null => false
+  end
+
+  def self.down
+    change_column :model3s, :name, :string
+
+    change_column :model2s, :name, :string
+  end
+end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Referenced by

Pages