Sha256: a8a2f643997ba5dfce073a5102189911a73604e1cedbe7b14032ae89f75ccf63
Contents?: true
Size: 567 Bytes
Versions: 72
Compression:
Stored size: 567 Bytes
Contents
# frozen_string_literal: true class AddTosVersionToOrganization < ActiveRecord::Migration[5.1] class Organization < ApplicationRecord self.table_name = :decidim_organizations end def up add_column :decidim_organizations, :tos_version, :datetime Organization.find_each do |organization| tos_version = Decidim::StaticPage.find_by(slug: "terms-and-conditions", organization: organization).updated_at organization.update(tos_version: tos_version) end end def down remove_columns :decidim_organizations, :tos_version end end
Version data entries
72 entries across 72 versions & 1 rubygems