Skip to content

Commit 7b98788

Browse files
committed
Remove Organization#short_name column
1 parent bcf4ed0 commit 7b98788

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
@@ -23,7 +23,6 @@
2323
# receive_email_on_requests :boolean default(FALSE), not null
2424
# reminder_day :integer
2525
# repackage_essentials :boolean default(FALSE), not null
26-
# short_name :string
2726
# signature_for_distribution_pdf :boolean default(FALSE)
2827
# state :string
2928
# 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
@@ -496,7 +495,6 @@
496495
t.boolean "signature_for_distribution_pdf", default: false
497496
t.boolean "receive_email_on_requests", default: false, null: false
498497
t.index ["latitude", "longitude"], name: "index_organizations_on_latitude_and_longitude"
499-
t.index ["short_name"], name: "index_organizations_on_short_name"
500498
end
501499

502500
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
@@ -23,7 +23,6 @@
2323
# receive_email_on_requests :boolean default(FALSE), not null
2424
# reminder_day :integer
2525
# repackage_essentials :boolean default(FALSE), not null
26-
# short_name :string
2726
# signature_for_distribution_pdf :boolean default(FALSE)
2827
# state :string
2928
# street :string

spec/models/organization_spec.rb

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

0 commit comments

Comments
 (0)