Sha256: 4032e577ae8ce143837eb367667c69ddba9bf1f7b6a10ab905f8fdff9fa28e1a
Contents?: true
Size: 440 Bytes
Versions: 13
Compression:
Stored size: 440 Bytes
Contents
# frozen_string_literal: true class AddPublishedAtToDecidimBlogsPosts < ActiveRecord::Migration[6.1] class Post < ApplicationRecord self.table_name = :decidim_blogs_posts end def change add_column :decidim_blogs_posts, :published_at, :datetime reversible do |direction| direction.up do Post.update_all("published_at = created_at") # rubocop:disable Rails/SkipsModelValidations end end end end
Version data entries
13 entries across 13 versions & 1 rubygems