Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class CreateAropenitems < ActiveRecord::Migration
def self.up
create_table :aropenitems do |t|
t.integer :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.integer :slsmn1
t.integer :slsmn2
t.integer :slsmn3
t.decimal :amt3, :precision => 7, :scale => 2
t.integer :city_county_tax
end
add_index(:aropenitems, [:cust_no, :doc_date, :doc_no, :doc_type], :unique => true, :name => 'cust_doc')
add_index(:aropenitems, [:apply_to_no, :cust_no], :name => 'apply_to')
add_index(:aropenitems, :city_county_tax, :name => 'texas_tax')
end
def self.down
drop_table :aropenitems
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment