Adding payments
This commit is contained in:
11
db/migrate/20130212030630_create_payments.rb
Normal file
11
db/migrate/20130212030630_create_payments.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreatePayments < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :payments do |t|
|
||||
t.references :user
|
||||
t.date :date
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :payments, :user_id
|
||||
end
|
||||
end
|
||||
5
db/migrate/20130212032046_add_created_by_to_payments.rb
Normal file
5
db/migrate/20130212032046_add_created_by_to_payments.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddCreatedByToPayments < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :payments, :created_by, :integer
|
||||
end
|
||||
end
|
||||
5
db/migrate/20130212054755_add_payee_to_users.rb
Normal file
5
db/migrate/20130212054755_add_payee_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddPayeeToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :payee, :string
|
||||
end
|
||||
end
|
||||
5
db/migrate/20130212083412_add_accountant_to_users.rb
Normal file
5
db/migrate/20130212083412_add_accountant_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddAccountantToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :accountant, :boolean
|
||||
end
|
||||
end
|
||||
14
db/schema.rb
14
db/schema.rb
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20130209103457) do
|
||||
ActiveRecord::Schema.define(:version => 20130212083412) do
|
||||
|
||||
create_table "cards", :force => true do |t|
|
||||
t.string "card_number"
|
||||
@@ -58,6 +58,16 @@ ActiveRecord::Schema.define(:version => 20130209103457) do
|
||||
|
||||
add_index "macs", ["user_id"], :name => "index_macs_on_user_id"
|
||||
|
||||
create_table "payments", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.date "date"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "created_by"
|
||||
end
|
||||
|
||||
add_index "payments", ["user_id"], :name => "index_payments_on_user_id"
|
||||
|
||||
create_table "user_certifications", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "certification_id"
|
||||
@@ -96,6 +106,8 @@ ActiveRecord::Schema.define(:version => 20130209103457) do
|
||||
t.boolean "instructor"
|
||||
t.boolean "hidden"
|
||||
t.string "marketing_source"
|
||||
t.string "payee"
|
||||
t.boolean "accountant"
|
||||
end
|
||||
|
||||
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
||||
|
||||
Reference in New Issue
Block a user