Browse Source

Add organisation id attribute to bulk upload

pull/2629/head
Manny Dinssa 2 years ago
parent
commit
dca1b5a1af
  1. 1
      app/models/bulk_upload.rb
  2. 5
      db/migrate/20240905092332_add_organisation_id_to_bulk_uploads.rb
  3. 28
      db/schema.rb

1
app/models/bulk_upload.rb

@ -3,6 +3,7 @@ class BulkUpload < ApplicationRecord
enum rent_type_fix_status: { not_applied: "not_applied", applied: "applied", not_needed: "not_needed" }
belongs_to :user
belongs_to :organisation, optional: true
has_many :bulk_upload_errors, dependent: :destroy

5
db/migrate/20240905092332_add_organisation_id_to_bulk_uploads.rb

@ -0,0 +1,5 @@
class AddOrganisationIdToBulkUploads < ActiveRecord::Migration[7.0]
def change
add_column :bulk_uploads, :organisation_id, :integer
end
end

28
db/schema.rb

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2024_08_19_143150) do
ActiveRecord::Schema[7.0].define(version: 2024_09_05_092332) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -42,6 +42,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_08_19_143150) do
t.text "choice"
t.integer "total_logs_count"
t.string "rent_type_fix_status", default: "not_applied"
t.integer "organisation_id"
t.index ["identifier"], name: "index_bulk_uploads_on_identifier", unique: true
t.index ["user_id"], name: "index_bulk_uploads_on_user_id"
end
@ -429,19 +430,24 @@ ActiveRecord::Schema[7.0].define(version: 2024_08_19_143150) do
create_table "merge_requests", force: :cascade do |t|
t.integer "requesting_organisation_id"
t.text "other_merging_organisations"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "status"
t.integer "absorbing_organisation_id"
t.boolean "new_absorbing_organisation"
t.boolean "telephone_number_correct"
t.string "new_telephone_number"
t.string "new_organisation_name"
t.string "new_organisation_address_line1"
t.string "new_organisation_address_line2"
t.string "new_organisation_postcode"
t.string "new_organisation_telephone_number"
t.datetime "merge_date"
t.integer "requester_id"
t.string "helpdesk_ticket"
t.integer "total_users"
t.integer "total_schemes"
t.integer "total_lettings_logs"
t.integer "total_sales_logs"
t.integer "total_stock_owners"
t.integer "total_managing_agents"
t.boolean "signed_dsa", default: false
t.datetime "discarded_at"
t.datetime "last_failed_attempt"
t.boolean "request_merged"
t.boolean "processing"
t.boolean "existing_absorbing_organisation"
end
create_table "notifications", force: :cascade do |t|

Loading…
Cancel
Save