Sha256: f163bc4b86d143ed52091f9ff7f2ec32294da86d134cb93817f85e776e9ae20f
Contents?: true
Size: 581 Bytes
Versions: 3
Compression:
Stored size: 581 Bytes
Contents
# For details on Sequel migrations see # http://sequel.rubyforge.org/ # http://code.google.com/p/ruby-sequel/wiki/Migrations class <%= class_name.snake_case.camel_case %> < Sequel::Migration def up <%= "create_table :#{table_name} do" if table_name %> <% if table_attributes.empty? -%> primary_key :id <% else -%> <% table_attributes.each do |attribute| -%> <%= attribute.type %> :<%= attribute.name %> <% end -%> <% end -%> <%= "end" if table_name %> end def down <% if table_name -%> execute "DROP TABLE <%= table_name %>" <% end -%> end end
Version data entries
3 entries across 3 versions & 1 rubygems