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