Froze rails gems
[depot.git] / vendor / rails / railties / lib / rails_generator / generators / components / model / templates / migration.rb
diff --git a/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb b/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
new file mode 100644 (file)
index 0000000..382fd11
--- /dev/null
@@ -0,0 +1,16 @@
+class <%= migration_name %> < ActiveRecord::Migration
+  def self.up
+    create_table :<%= table_name %> do |t|
+<% for attribute in attributes -%>
+      t.<%= attribute.type %> :<%= attribute.name %>
+<% end -%>
+<% unless options[:skip_timestamps] %>
+      t.timestamps
+<% end -%>
+    end
+  end
+
+  def self.down
+    drop_table :<%= table_name %>
+  end
+end