Sha256: 9fc60dc2060bb66c46325547675a3882fb5b9744c384571dc7ef37502e0eddb0

Contents?: true

Size: 448 Bytes

Versions: 90

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

class AddPublishedAtToProposals < ActiveRecord::Migration[5.1]
  def up
    add_column :decidim_proposals_proposals, :published_at, :datetime, index: true
    # rubocop:disable Rails/SkipsModelValidations
    Decidim::Proposals::Proposal.update_all("published_at = updated_at")
    # rubocop:enable Rails/SkipsModelValidations
  end

  def down
    remove_column :decidim_proposals_proposals, :published_at
  end
end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
decidim-proposals-0.29.1 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.28.4 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.27.9 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.29.0 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.28.3 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.27.8 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.29.0.rc4 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.29.0.rc3 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.29.0.rc2 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.29.0.rc1 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.28.2 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.27.7 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.28.1 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.27.6 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.26.10 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.26.9 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.28.0 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.27.5 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.28.0.rc5 db/migrate/20171220084719_add_published_at_to_proposals.rb
decidim-proposals-0.28.0.rc4 db/migrate/20171220084719_add_published_at_to_proposals.rb