class CreateSourceFiles < ActiveRecord::Migration[5.1]
  def change
    create_table :source_files do |t|
      t.belongs_to :creator, polymorphic: true
      t.string     :sti_type
      t.string     :state
      t.string     :description
      t.integer    :number_of_records
      t.integer    :duration
      t.string     :original_file
      t.date       :current_at_day
      t.string     :original_file_file_name
      t.string     :original_file_content_type
      t.bigint     :original_file_file_size
      t.datetime   :original_file_updated_at

      t.timestamps null: false
    end

    add_index :source_files, :sti_type
  end
end

