Sha256: b1aa089360a94615685c28f634e91a277c129eccc119c336edaa948e2695e9ad

Contents?: true

Size: 398 Bytes

Versions: 15

Compression:

Stored size: 398 Bytes

Contents

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

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
decidim-admin-0.2.0 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-0.2.0 decidim-admin/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-admin-0.1.0 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-0.1.0 decidim-admin/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-admin-0.0.8.1 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-0.0.8.1 decidim-admin/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-admin-0.0.7 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-0.0.7 decidim-admin/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-admin-0.0.6 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-0.0.6 decidim-admin/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-admin-0.0.5 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-0.0.5 decidim-admin/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-0.0.4 decidim-admin/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-admin-0.0.3 db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb
decidim-0.0.3 decidim-admin/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb