Created the following Ruby Migration program 001_create_aropenitems.rb
class CreateAropenitems < ActiveRecord::Migration
def self.up
create_table :aropenitem do |t|
t.int :cust_no
t.date :doc_date
t.integer :doc_no
t.string :doc_type, :limit => 1
t.integer :apply_to_no
t.date :doc_due_date
t.decimal :amt1, :precision => 9, :scale => 2
t.decimal :amt2, :precision => 9, :scale => 2
t.string :ref, :limit => 30
t.int :slsmn1
t.int :slsmn2
t.int :slsmn3
t.decimal :amt3, :precision => 7, :scale => 2
t.int :city_county_tax
end
add_index(:aropenitem, [:cust_no, :doc_date, :doc_no, :doc_type],
:unique => true, :name => 'cust_doc')
add_index(:aropenitem, [:apply_to_no, :cust_no], :name =>
'apply_to')
add_index(:aropenitem, :city_county_tax, :name => 'texas_tax')
end
def self.down
drop_table :aropenitems
end
When I run rake I get the following trace:
lenyel@lenyel-laptop:~/bruskerb$ rake --trace
(in /home/lenyel/bruskerb)
** Invoke default (first_time)
** Invoke migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute migrate
== CreateAropenitems: migrating