Sha256: ba3a9f81feb2b053b2327fb5a54760c10cf183a2b646dabfdd6a41442e258677

Contents?: true

Size: 372 Bytes

Versions: 9

Compression:

Stored size: 372 Bytes

Contents

class Create<%= @data[:classname] %> < ActiveRecord::Migration[<%= @data[:ar_version] %>]
  def self.up
    create_table :<%= @data[:plural] %> do |t|
<% @data[:ary].each do |x| %>
      t.column :<%= x.name %>, :<%= x.type %>, :null => <%= x.null %>
<% end %>
      t.timestamps  null: false
    end
  end

  def self.down
    drop_table :<%= @data[:plural] %>
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arxutils_sqlite3-0.1.64 lib/template/acrecord/base.tmpl
arxutils_sqlite3-0.1.63 lib/template/acrecord/base.tmpl
arxutils_sqlite3-0.1.61 lib/template/acrecord/base.tmpl
arxutils_sqlite3-0.1.60 lib/template/acrecord/base.tmpl
arxutils_sqlite3-0.1.59 lib/template/acrecord/base.tmpl
arxutils_sqlite3-0.1.58 lib/template/acrecord/base.tmpl
arxutils_sqlite3-0.1.57 lib/template/acrecord/base.tmpl
arxutils_sqlite3-0.1.56 lib/template/acrecord/base.tmpl
arxutils_sqlite3-0.1.55 lib/template/acrecord/base.tmpl