Sha256: ac985c8767313e5e81c54256735b21fdfc75f5a77f7998e367b0d82caa133481
Contents?: true
Size: 804 Bytes
Versions: 1
Compression:
Stored size: 804 Bytes
Contents
class CreateEchiTrunks < ActiveRecord::Migration def self.up #We create the table from the one defined in the application.yml file create_table "echi_trunks", :force => true do |t| @@echi_schema["echi_trunks"].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_trunks" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
echi-converter-0.3.8 | db/migrate/011_create_echi_trunks.rb |