Remove unused model
It was added in commit 74083df1; we're not sure why.
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
class BudgetRolAssignment < ApplicationRecord
|
|
||||||
belongs_to :budget
|
|
||||||
belongs_to :user
|
|
||||||
end
|
|
||||||
@@ -45,7 +45,6 @@ class User < ApplicationRecord
|
|||||||
inverse_of: :receiver
|
inverse_of: :receiver
|
||||||
has_many :legislation_answers, class_name: "Legislation::Answer", dependent: :destroy, inverse_of: :user
|
has_many :legislation_answers, class_name: "Legislation::Answer", dependent: :destroy, inverse_of: :user
|
||||||
has_many :follows
|
has_many :follows
|
||||||
has_many :budget_rol_assignments
|
|
||||||
has_many :legislation_annotations,
|
has_many :legislation_annotations,
|
||||||
class_name: "Legislation::Annotation",
|
class_name: "Legislation::Annotation",
|
||||||
foreign_key: :author_id,
|
foreign_key: :author_id,
|
||||||
@@ -80,7 +79,6 @@ class User < ApplicationRecord
|
|||||||
foreign_key: :author_id,
|
foreign_key: :author_id,
|
||||||
inverse_of: :author
|
inverse_of: :author
|
||||||
has_many :topics, foreign_key: :author_id, inverse_of: :author
|
has_many :topics, foreign_key: :author_id, inverse_of: :author
|
||||||
has_many :budgets, through: :budget_rol_assignments
|
|
||||||
belongs_to :geozone
|
belongs_to :geozone
|
||||||
|
|
||||||
validates :username, presence: true, if: :username_required?
|
validates :username, presence: true, if: :username_required?
|
||||||
|
|||||||
9
db/migrate/20191031172132_drop_budget_rol_assignments.rb
Normal file
9
db/migrate/20191031172132_drop_budget_rol_assignments.rb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
class DropBudgetRolAssignments < ActiveRecord::Migration[5.0]
|
||||||
|
def up
|
||||||
|
drop_table :budget_rol_assignments
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
fail ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
|
end
|
||||||
14
db/schema.rb
14
db/schema.rb
@@ -10,7 +10,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: 20191030160347) do
|
ActiveRecord::Schema.define(version: 20191031172132) 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"
|
||||||
@@ -340,16 +340,6 @@ ActiveRecord::Schema.define(version: 20191030160347) do
|
|||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "budget_rol_assignments", force: :cascade do |t|
|
|
||||||
t.integer "budget_id"
|
|
||||||
t.integer "user_id"
|
|
||||||
t.string "rol"
|
|
||||||
t.datetime "created_at", null: false
|
|
||||||
t.datetime "updated_at", null: false
|
|
||||||
t.index ["budget_id"], name: "index_budget_rol_assignments_on_budget_id", using: :btree
|
|
||||||
t.index ["user_id"], name: "index_budget_rol_assignments_on_user_id", using: :btree
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "budget_tracker_assignments", force: :cascade do |t|
|
create_table "budget_tracker_assignments", force: :cascade do |t|
|
||||||
t.integer "tracker_id"
|
t.integer "tracker_id"
|
||||||
t.integer "investment_id"
|
t.integer "investment_id"
|
||||||
@@ -1713,8 +1703,6 @@ ActiveRecord::Schema.define(version: 20191030160347) do
|
|||||||
add_foreign_key "budget_administrators", "administrators"
|
add_foreign_key "budget_administrators", "administrators"
|
||||||
add_foreign_key "budget_administrators", "budgets"
|
add_foreign_key "budget_administrators", "budgets"
|
||||||
add_foreign_key "budget_investments", "communities"
|
add_foreign_key "budget_investments", "communities"
|
||||||
add_foreign_key "budget_rol_assignments", "budgets"
|
|
||||||
add_foreign_key "budget_rol_assignments", "users"
|
|
||||||
add_foreign_key "budget_tracker_assignments", "trackers"
|
add_foreign_key "budget_tracker_assignments", "trackers"
|
||||||
add_foreign_key "budget_trackers", "budgets"
|
add_foreign_key "budget_trackers", "budgets"
|
||||||
add_foreign_key "budget_trackers", "trackers"
|
add_foreign_key "budget_trackers", "trackers"
|
||||||
|
|||||||
Reference in New Issue
Block a user