Sha256: 2f20dc6ab36c5f30bd5a93bc254f61261d3041e032d4db12869b87e930504d75
Contents?: true
Size: 808 Bytes
Versions: 1
Compression:
Stored size: 808 Bytes
Contents
class CreateEchiVectors < ActiveRecord::Migration def self.up #We create the table from the one defined in the application.yml file create_table "echi_vectors", :force => true do |t| @@echi_schema["echi_vectors"].each do | field | case field["type"] when 'int' t.column field["name"], :integer, :limit => field["length"], :precision => field["length"], :scale => 0 when 'str' t.column field["name"], :string, :limit => field["length"] when 'datetime' t.column field["name"], :datetime when 'bool' t.column field["name"], :string, :limit => 1 when 'boolint' t.column field["name"], :string, :limit => 1 end end end end def self.down drop_table "echi_vectors" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
echi-converter-0.3.8 | db/migrate/012_create_echi_vectors.rb |