Skip to content

Commit 495d1c0

Browse files
authored
Remove Organization#short_name column (#5187)
1 parent 0d68ddc commit 495d1c0

5 files changed

Lines changed: 14 additions & 6 deletions

File tree

app/models/organization.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# receive_email_on_requests :boolean default(FALSE), not null
2525
# reminder_day :integer
2626
# repackage_essentials :boolean default(FALSE), not null
27-
# short_name :string
2827
# signature_for_distribution_pdf :boolean default(FALSE)
2928
# state :string
3029
# street :string
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class RemoveShortNameFromOrganizations < ActiveRecord::Migration[8.0]
2+
def up
3+
safety_assured do
4+
remove_index :organizations, :short_name
5+
remove_column :organizations, :short_name
6+
end
7+
end
8+
9+
def down
10+
add_column :organizations, :short_name
11+
add_index :organizations, :short_name
12+
end
13+
end

db/schema.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[8.0].define(version: 2025_04_04_102321) do
13+
ActiveRecord::Schema[8.0].define(version: 2025_05_04_183911) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "pg_catalog.plpgsql"
1616

@@ -465,7 +465,6 @@
465465

466466
create_table "organizations", id: :serial, force: :cascade do |t|
467467
t.string "name"
468-
t.string "short_name"
469468
t.string "email"
470469
t.string "url"
471470
t.datetime "created_at", precision: nil, null: false
@@ -497,7 +496,6 @@
497496
t.boolean "receive_email_on_requests", default: false, null: false
498497
t.boolean "include_in_kind_values_in_exported_files", default: false, null: false
499498
t.index ["latitude", "longitude"], name: "index_organizations_on_latitude_and_longitude"
500-
t.index ["short_name"], name: "index_organizations_on_short_name"
501499
end
502500

503501
create_table "partner_forms", force: :cascade do |t|

spec/factories/organizations.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# receive_email_on_requests :boolean default(FALSE), not null
2525
# reminder_day :integer
2626
# repackage_essentials :boolean default(FALSE), not null
27-
# short_name :string
2827
# signature_for_distribution_pdf :boolean default(FALSE)
2928
# state :string
3029
# street :string

spec/models/organization_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# receive_email_on_requests :boolean default(FALSE), not null
2525
# reminder_day :integer
2626
# repackage_essentials :boolean default(FALSE), not null
27-
# short_name :string
2827
# signature_for_distribution_pdf :boolean default(FALSE)
2928
# state :string
3029
# street :string

0 commit comments

Comments
 (0)