Remove unused model

It was added in commit 74083df1; we're not sure why.
This commit is contained in:
Javi Martín
2019-10-31 18:23:59 +01:00
parent 8ed3595b70
commit 184d5fc504
4 changed files with 10 additions and 19 deletions

View File

@@ -1,4 +0,0 @@
class BudgetRolAssignment < ApplicationRecord
belongs_to :budget
belongs_to :user
end

View File

@@ -45,7 +45,6 @@ class User < ApplicationRecord
inverse_of: :receiver
has_many :legislation_answers, class_name: "Legislation::Answer", dependent: :destroy, inverse_of: :user
has_many :follows
has_many :budget_rol_assignments
has_many :legislation_annotations,
class_name: "Legislation::Annotation",
foreign_key: :author_id,
@@ -80,7 +79,6 @@ class User < ApplicationRecord
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
validates :username, presence: true, if: :username_required?

View 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

View File

@@ -10,7 +10,7 @@
#
# 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
enable_extension "plpgsql"
@@ -340,16 +340,6 @@ ActiveRecord::Schema.define(version: 20191030160347) do
t.datetime "updated_at", null: false
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|
t.integer "tracker_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", "budgets"
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_trackers", "budgets"
add_foreign_key "budget_trackers", "trackers"