diff --git a/app/models/organization.rb b/app/models/organization.rb index f87f01f971..e9aa4f8e4c 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -24,7 +24,6 @@ # receive_email_on_requests :boolean default(FALSE), not null # reminder_day :integer # repackage_essentials :boolean default(FALSE), not null -# short_name :string # signature_for_distribution_pdf :boolean default(FALSE) # state :string # street :string diff --git a/db/migrate/20250504183911_remove_short_name_from_organizations.rb b/db/migrate/20250504183911_remove_short_name_from_organizations.rb new file mode 100644 index 0000000000..9f318c86c1 --- /dev/null +++ b/db/migrate/20250504183911_remove_short_name_from_organizations.rb @@ -0,0 +1,13 @@ +class RemoveShortNameFromOrganizations < ActiveRecord::Migration[8.0] + def up + safety_assured do + remove_index :organizations, :short_name + remove_column :organizations, :short_name + end + end + + def down + add_column :organizations, :short_name + add_index :organizations, :short_name + end +end diff --git a/db/schema.rb b/db/schema.rb index 0046eb8f61..25c73f88a0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.0].define(version: 2025_04_04_102321) do +ActiveRecord::Schema[8.0].define(version: 2025_05_04_183911) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" @@ -465,7 +465,6 @@ create_table "organizations", id: :serial, force: :cascade do |t| t.string "name" - t.string "short_name" t.string "email" t.string "url" t.datetime "created_at", precision: nil, null: false @@ -497,7 +496,6 @@ t.boolean "receive_email_on_requests", default: false, null: false t.boolean "include_in_kind_values_in_exported_files", default: false, null: false t.index ["latitude", "longitude"], name: "index_organizations_on_latitude_and_longitude" - t.index ["short_name"], name: "index_organizations_on_short_name" end create_table "partner_forms", force: :cascade do |t| diff --git a/spec/factories/organizations.rb b/spec/factories/organizations.rb index 0d1b3e48d4..bfd006b09c 100644 --- a/spec/factories/organizations.rb +++ b/spec/factories/organizations.rb @@ -24,7 +24,6 @@ # receive_email_on_requests :boolean default(FALSE), not null # reminder_day :integer # repackage_essentials :boolean default(FALSE), not null -# short_name :string # signature_for_distribution_pdf :boolean default(FALSE) # state :string # street :string diff --git a/spec/models/organization_spec.rb b/spec/models/organization_spec.rb index 8ad440f7df..a50d49e2ee 100644 --- a/spec/models/organization_spec.rb +++ b/spec/models/organization_spec.rb @@ -24,7 +24,6 @@ # receive_email_on_requests :boolean default(FALSE), not null # reminder_day :integer # repackage_essentials :boolean default(FALSE), not null -# short_name :string # signature_for_distribution_pdf :boolean default(FALSE) # state :string # street :string