Sha256: d92a1df54600dcea709bd2c93cfd25e5c4503314c6bcd7615acd495cff5c2e74

Contents?: true

Size: 723 Bytes

Versions: 4

Compression:

Stored size: 723 Bytes

Contents

class CreateCustomReportTable < ActiveRecord::Migration
  def self.up
    create_table :custom_report_reports do |t|
      t.string   :name
      t.text     :description
      t.text     :scope
      t.text     :columns
      t.text     :filters
      t.boolean  :has_checklist
      t.integer  :administrator_id
      t.string   :administrator_type
      t.string   :category
      t.datetime :last_opened
      t.datetime :deleted_at
      t.timestamps
    end

    create_table :custom_report_report_check_items do |t|
      t.integer  :report_id
      t.integer  :item_id
      t.timestamps
    end
  end

  def self.down
    drop_table :custom_report_report_check_items
    drop_table :custom_report_reports
  end
end

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
custom_report-0.0.2 lib/generators/custom_report/templates/migration.rb
custom_report-0.0.2 test/dummy/db/migrate/20131114010848_create_custom_report_table.rb
custom_report-0.0.1 lib/generators/custom_report/templates/migration.rb
custom_report-0.0.1 test/dummy/db/migrate/20131114010848_create_custom_report_table.rb