diff options
Diffstat (limited to 'db/ci/migrate/20150703125325_encrypt_variables.rb')
-rw-r--r-- | db/ci/migrate/20150703125325_encrypt_variables.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/ci/migrate/20150703125325_encrypt_variables.rb b/db/ci/migrate/20150703125325_encrypt_variables.rb new file mode 100644 index 00000000000..c5f9d048fb1 --- /dev/null +++ b/db/ci/migrate/20150703125325_encrypt_variables.rb @@ -0,0 +1,10 @@ +class EncryptVariables < ActiveRecord::Migration + def up + Variable.find_each do |variable| + variable.update(value: variable.read_attribute(:value)) unless variable.encrypted_value + end + end + + def down + end +end |