-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
228 remove location columns on organizations table and add zipcode to…
… locations table (#230) * Remove location fields to Organization * Add zipcode field to locations * Fix seeds * Add zipcode to location factory * WIP: Remove organization.city usage from views/organizations/home/index.html.erb * Run automatic fixer * Remove unecessary comment
- Loading branch information
1 parent
7c655e1
commit 11802f5
Showing
9 changed files
with
41 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
db/migrate/20231003094720_remove_location_fields_from_organizations.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class RemoveLocationFieldsFromOrganizations < ActiveRecord::Migration[7.0] | ||
def up | ||
safety_assured do | ||
remove_column :organizations, :city, :string | ||
remove_column :organizations, :country, :string | ||
remove_column :organizations, :zipcode, :string | ||
end | ||
end | ||
|
||
def down | ||
add_column :organizations, :city, :string | ||
add_column :organizations, :country, :string | ||
add_column :organizations, :zipcode, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class AddZipcodeToLocations < ActiveRecord::Migration[7.0] | ||
def up | ||
add_column :locations, :zipcode, :string | ||
end | ||
|
||
def down | ||
safety_assured { remove_column :locations, :zipcode, :string } | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters