Class: CreateImports

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/reso/templates/create_imports.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/generators/reso/templates/create_imports.rb', line 2

def change
  create_table :imports do |t|
    t.integer     :status, default: 0
    t.string      :name
    t.string      :token
    t.references  :import_format, index: true
    t.string      :repeating_element, default: "Listing"
    t.string      :unique_identifier, default: "ListingKey"
    t.string      :source_url
    t.string      :source_user
    t.string      :source_pass
    t.datetime    :source_data_modified

    t.timestamps null: false
  end
  add_index :imports, :token
end