Sha256: cb79c92449e5860996e96af871cb7eac2860fe8a2b1d8091b250990abc4739c7

Contents?: true

Size: 852 Bytes

Versions: 4

Compression:

Stored size: 852 Bytes

Contents

class AddIbBars < ActiveRecord::Migration

  def change
    # This is a single data point delivered by HistoricData or RealTimeBar messages.
    create_table(:ib_bars) do |t|
      t.references :contract
      t.float :open #       double:
      t.float :high #       double:
      t.float :low #        double:
      t.float :close #      double:
      t.float :wap #      double:
      t.integer :volume #
      t.integer :trades # Number of trades during the time period the bar covers
      t.boolean :has_gaps, :limit => 1 # Whether or not there are gaps in the data
      t.string :time, :limit => 18 # String! The order execution time
      t.timestamps
    end
  end
end

__END__
rails generate scaffold bar contract_id:integer open:float high:float low:float close:float
 wap:float volume:integer trades:integer has_gaps:boolean time:string 

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ib-ruby-0.9.2 db/migrate/111_add_ib_bars.rb
ib-ruby-0.9.1 db/migrate/111_add_ib_bars.rb
ib-ruby-0.9.0 db/migrate/111_add_ib_bars.rb
ib-ruby-0.8.5 db/migrate/111_add_ib_bars.rb