Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20150703125325_encrypt_variables.rb « migrate « ci « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c5f9d048fb13a846819acffd39bff995507d9bc7 (plain)
1
2
3
4
5
6
7
8
9
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