migrates
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
class CreateBudgetValuatorAssignments < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :budget_valuator_assignments, index: false do |t|
|
||||||
|
t.belongs_to :valuator
|
||||||
|
t.integer :investment_id, index: true
|
||||||
|
t.timestamps null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class AddBudgetInvestmentsCountToValuators < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :valuators, :budget_investments_count, :integer, default: 0
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20160523150146_rename_bi_valuation_count.rb
Normal file
5
db/migrate/20160523150146_rename_bi_valuation_count.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
class RenameBiValuationCount < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
rename_column :budget_investments, :valuation_assignments_count, :valuator_assignments_count
|
||||||
|
end
|
||||||
|
end
|
||||||
30
db/schema.rb
30
db/schema.rb
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20160523143320) do
|
ActiveRecord::Schema.define(version: 20160523150146) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@@ -93,20 +93,20 @@ ActiveRecord::Schema.define(version: 20160523143320) do
|
|||||||
t.string "title"
|
t.string "title"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.string "external_url"
|
t.string "external_url"
|
||||||
t.integer "price", limit: 8
|
t.integer "price", limit: 8
|
||||||
t.string "feasibility", limit: 15, default: "undecided"
|
t.string "feasibility", limit: 15, default: "undecided"
|
||||||
t.text "price_explanation"
|
t.text "price_explanation"
|
||||||
t.text "unfeasibility_explanation"
|
t.text "unfeasibility_explanation"
|
||||||
t.text "internal_comments"
|
t.text "internal_comments"
|
||||||
t.boolean "valuation_finished", default: false
|
t.boolean "valuation_finished", default: false
|
||||||
t.integer "valuation_assignments_count", default: 0
|
t.integer "valuator_assignments_count", default: 0
|
||||||
t.integer "price_first_year", limit: 8
|
t.integer "price_first_year", limit: 8
|
||||||
t.string "duration"
|
t.string "duration"
|
||||||
t.datetime "hidden_at"
|
t.datetime "hidden_at"
|
||||||
t.integer "cached_votes_up", default: 0
|
t.integer "cached_votes_up", default: 0
|
||||||
t.integer "comments_count", default: 0
|
t.integer "comments_count", default: 0
|
||||||
t.integer "confidence_score", default: 0, null: false
|
t.integer "confidence_score", default: 0, null: false
|
||||||
t.integer "physical_votes", default: 0
|
t.integer "physical_votes", default: 0
|
||||||
t.tsvector "tsv"
|
t.tsvector "tsv"
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
@@ -120,6 +120,15 @@ ActiveRecord::Schema.define(version: 20160523143320) do
|
|||||||
add_index "budget_investments", ["budget_id"], name: "index_budget_investments_on_budget_id", using: :btree
|
add_index "budget_investments", ["budget_id"], name: "index_budget_investments_on_budget_id", using: :btree
|
||||||
add_index "budget_investments", ["tsv"], name: "index_budget_investments_on_tsv", using: :gin
|
add_index "budget_investments", ["tsv"], name: "index_budget_investments_on_tsv", using: :gin
|
||||||
|
|
||||||
|
create_table "budget_valuator_assignments", force: :cascade do |t|
|
||||||
|
t.integer "valuator_id"
|
||||||
|
t.integer "investment_id"
|
||||||
|
t.datetime "created_at", null: false
|
||||||
|
t.datetime "updated_at", null: false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "budget_valuator_assignments", ["investment_id"], name: "index_budget_valuator_assignments_on_investment_id", using: :btree
|
||||||
|
|
||||||
create_table "budgets", force: :cascade do |t|
|
create_table "budgets", force: :cascade do |t|
|
||||||
t.string "name", limit: 30
|
t.string "name", limit: 30
|
||||||
t.text "description"
|
t.text "description"
|
||||||
@@ -513,6 +522,7 @@ ActiveRecord::Schema.define(version: 20160523143320) do
|
|||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.string "description"
|
t.string "description"
|
||||||
t.integer "spending_proposals_count", default: 0
|
t.integer "spending_proposals_count", default: 0
|
||||||
|
t.integer "budget_investments_count", default: 0
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "valuators", ["user_id"], name: "index_valuators_on_user_id", using: :btree
|
add_index "valuators", ["user_id"], name: "index_valuators_on_user_id", using: :btree
|
||||||
|
|||||||
Reference in New Issue
Block a user