adds Budget::Group model to group headings
many refactors through budget related models
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
class CreateBudgetHeading < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :budget_headings do |t|
|
||||
t.references :budget
|
||||
t.references :group, index: true
|
||||
t.references :geozone
|
||||
t.string :name, limit: 50
|
||||
t.string :name, limit: 50
|
||||
t.integer :price, limit: 8
|
||||
end
|
||||
end
|
||||
|
||||
10
db/migrate/20160609110023_create_budget_group.rb
Normal file
10
db/migrate/20160609110023_create_budget_group.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateBudgetGroup < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :budget_groups do |t|
|
||||
t.references :budget
|
||||
t.string :name, limit: 50
|
||||
end
|
||||
|
||||
add_index :budget_groups, :budget_id
|
||||
end
|
||||
end
|
||||
5
db/migrate/20160609142017_remove_price_from_budget.rb
Normal file
5
db/migrate/20160609142017_remove_price_from_budget.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class RemovePriceFromBudget < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :budgets, :price, :integer
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class RemoveBudgetIdFromInvestments < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :budget_investments, :budget_id, :integer
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user