All pastes #178767 Raw Edit

Miscellany

public text v1 · immutable
#178767 ·published 2006-09-21 16:23 UTC
rendered paste body
  def create_load_table(table_name)
    begin
      ActiveRecord::Schema.define do
        create_table "#{table_name}" do | t |
          t.column :sourceid,   :number
          t.column :name,       :string
          t.column :agent,      :number
          t.column :phone,      :string
          t.column :phone1,     :string
          t.column :phone2,     :string
          t.column :phone3,     :string
          t.column :phonedesc1, :string
          t.column :phonedesc2, :string
          t.column :phonedesc3, :string
          t.column :timezone,   :string
          t.column :comments,   :string
        end
      end
      return true
    rescue Exception => err
      return err.message
    end
  end