Sha256: 1bfe94168b66b137244d733c7832568e62c53576e7ca6d5aaaf2621f43e8efa9

Contents?: true

Size: 402 Bytes

Versions: 4

Compression:

Stored size: 402 Bytes

Contents

class Create<%= class_name.classify.pluralize %> < ActiveRecord::Migration
  def self.up
    create_table :<%= class_name.pluralize %> do |t|
      t.string :name
      t.datetime :start_at
      t.datetime :end_at
      <%- if options[:use_all_day] -%>
      t.boolean :all_day
      <%- end -%>

      t.timestamps
    end
  end

  def self.down
    drop_table :<%= class_name.pluralize %>
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
event-calendar-2.3.3 generators/event_calendar/templates/migration.rb.erb
event-calendar-2.3.2 generators/event_calendar/templates/migration.rb.erb
event-calendar-2.3.1 generators/event_calendar/templates/migration.rb.erb
elevation_event_calendar-1.0.0 ./generators/event_calendar/templates/migration.rb.erb