Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add migration to drop dead spree_mail_methods table and some dead mai…
…l_methods preferences
- Loading branch information
1 parent
a38b18b
commit 0e5d7c1
Showing
3 changed files
with
17 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class DropMailMethods < ActiveRecord::Migration | ||
def up | ||
drop_table :spree_mail_methods | ||
|
||
# delete mail_method preferences associated with the old MailMethod model | ||
execute "DELETE FROM spree_preferences WHERE key LIKE 'spree/mail_method%'" | ||
end | ||
|
||
def down | ||
create_table :spree_mail_methods do |t| | ||
t.string :environment | ||
t.boolean :active, default: true | ||
t.timestamps | ||
end | ||
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
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