Created
July 21, 2015 15:07
-
-
Save codeadict/b55d1b50a71752c86ded to your computer and use it in GitHub Desktop.
Importer Data structure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DataImportTables < ActiveRecord::Migration | |
def change | |
create_table :imports do |t| | |
t.string :for_model, null: false, default: 'Properties' | |
t.string :name, null: false | |
t.attachment :file, null: false | |
t.references :company, null: false | |
t.timestamps null: false | |
end | |
create_table :import_mappings do |t| | |
t.references :import, null: false | |
t.string :excel_field, null: false | |
t.string :db_field | |
t.boolean :import_it, default: false | |
t.boolean :is_seach_key, default: false | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment