Sha256: fb95daec3eb259d2bc7ddd65718ba3e929e123f8ac87468a90f4a6aadaabcecd

Contents?: true

Size: 525 Bytes

Versions: 19

Compression:

Stored size: 525 Bytes

Contents

class <%= migration_name %> < ActiveRecord::Migration
  def self.up
    create_table :<%= table_name %>, :force => true do |t|
# TODO: Remove the columns you don't want recorded.
<% for column in columns -%>
      t.column :<%=column.name%>, :<%=column.type%><%=", :limit => #{column.limit}" unless column.limit.nil? %><%=", :null => #{column.null}" unless column.null %><%=", :default => #{column.default}" unless column.default.nil? %>
<% end -%>
    end
  end

  def self.down
    drop_table "<%= table_name %>"
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
backlog-0.37.2 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.37.1 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.36.2 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.29.0 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.31.0 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.30.0 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.31.1 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.32.0 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.33.0 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.34.1 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.33.1 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.34.2 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.34 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.35.0 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.35.2 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.35.1 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.35.4 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.35.3 vendor/plugins/has_history/generators/history_migration/templates/migration.rb
backlog-0.35.5 vendor/plugins/has_history/generators/history_migration/templates/migration.rb