Class: CreateDownloads

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/xport/install/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#downObject



20
21
22
# File 'lib/generators/xport/install/templates/migration.rb', line 20

def down
  drop_table :downloads
end

#upObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/generators/xport/install/templates/migration.rb', line 4

def up
  create_table :downloads do |t|
    t.string   :user_id
    t.string   :file_filename
    t.string   :filename
    t.string   :job_id
    t.string   :export_klass_name
    t.string   :export_model_name
    t.text     :query
    t.integer  :records_count
    t.datetime :exported_at
    t.string   :export_additional_columns, array: true, default: []
    t.timestamps
  end
end