Sha256: c7c0db7b8148cd089f9be5c18b81131f1602b4b7c3870c0432dc2e11e1c11b01
Contents?: true
Size: 548 Bytes
Versions: 38
Compression:
Stored size: 548 Bytes
Contents
# frozen_string_literal: true class AddSaltToElections < ActiveRecord::Migration[5.2] class Election < ApplicationRecord self.table_name = :decidim_elections_elections end def up add_column :decidim_elections_elections, :salt, :string, null: false, default: "" Election.find_each do |election| election.salt = Decidim::Tokenizer.random_salt election.save! end change_column_default(:decidim_elections_elections, :salt, nil) end def down remove_column :decidim_elections_elections, :salt end end
Version data entries
38 entries across 38 versions & 1 rubygems