Sha256: 6e3c35b85bc86accb700fad909bfb4e1e380948855dd2035e55f920ad5e09e64

Contents?: true

Size: 400 Bytes

Versions: 6

Compression:

Stored size: 400 Bytes

Contents

# frozen_string_literal: true

class ChangeUserGroupsVerifiedToTimestamp < ActiveRecord::Migration[5.0]
  def change
    ActiveRecord::Base.transaction do
      add_column :decidim_user_groups, :verified_at, :datetime
      execute("UPDATE decidim_user_groups SET verified_at = '#{Time.current.to_fs(:db)}' WHERE verified = 't'")
      remove_column :decidim_user_groups, :verified
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-core-0.29.1 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-core-0.29.0 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-core-0.29.0.rc4 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-core-0.29.0.rc3 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-core-0.29.0.rc2 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-core-0.29.0.rc1 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb