-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nodes can get their Site through their language.
- Loading branch information
Showing
4 changed files
with
25 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class RemoveSiteIdFromNodes < ActiveRecord::Migration[6.0] | ||
def up | ||
remove_index :alchemy_nodes, :site_id | ||
remove_column :alchemy_nodes, :site_id, :integer, null: false | ||
end | ||
|
||
def down | ||
# This IS, in fact, reversible - but it's cumbersome to do. If someone tells me it benefits them | ||
# I will implement. | ||
raise ActiveRecord::IrreversibleMigration | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
spec/dummy/db/migrate/20200504210159_remove_site_id_from_nodes.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,12 @@ | ||
class RemoveSiteIdFromNodes < ActiveRecord::Migration[6.0] | ||
def up | ||
remove_index :alchemy_nodes, :site_id | ||
remove_column :alchemy_nodes, :site_id, :integer, null: false | ||
end | ||
|
||
def down | ||
# This IS, in fact, reversible - but it's cumbersome to do. If someone tells me it benefits them | ||
# I will implement. | ||
raise ActiveRecord::IrreversibleMigration | ||
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