This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate the encryption migration jobs, and update the link for trent…
… U's contact
- Loading branch information
Showing
7 changed files
with
23 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
class EncryptAnswerText < ActiveRecord::Migration | ||
def up | ||
def change | ||
rename_column :answers, :text, :old_text | ||
add_column :answers, :encrypted_text, :string | ||
add_column :answers, :encrypted_text_iv, :string | ||
Answer.find_each do |a| | ||
a.text = a.old_text | ||
a.save | ||
end | ||
remove_column :answers, :old_text | ||
end | ||
|
||
def down | ||
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 |
---|---|---|
@@ -1,16 +1,8 @@ | ||
class EncryptCommentText < ActiveRecord::Migration | ||
def up | ||
def change | ||
rename_column :comments, :text, :old_text | ||
add_column :comments, :encrypted_text, :string | ||
add_column :comments, :encrypted_text_iv, :string | ||
Comment.find_each do |a| | ||
a.text = a.old_text | ||
a.save | ||
end | ||
remove_column :comments, :old_text | ||
end | ||
|
||
def down | ||
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 MigrateAnswerData < ActiveRecord::Migration | ||
def change | ||
Answer.find_each do |a| | ||
a.text = a.old_text | ||
a.save | ||
end | ||
remove_column :answers, :old_text | ||
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 MigrateCommentData < ActiveRecord::Migration | ||
def change | ||
Comment.find_each do |a| | ||
a.text = a.old_text | ||
a.save | ||
end | ||
remove_column :comments, :old_text | ||
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