Sha256: 15471ffc751a47da4e36443b32237d356db01ba0cdd6f517b0f48d26a1c3dc48
Contents?: true
Size: 514 Bytes
Versions: 75
Compression:
Stored size: 514 Bytes
Contents
# frozen_string_literal: true class AddEndVotingDateToDecidimConsultations < ActiveRecord::Migration[5.1] class Consultation < ApplicationRecord self.table_name = :decidim_consultations end def change add_column :decidim_consultations, :end_voting_date, :date Consultation.find_each do |consultation| consultation.end_voting_date = consultation.start_voting_date + 1.month consultation.save end change_column_null :decidim_consultations, :end_voting_date, false end end
Version data entries
75 entries across 75 versions & 1 rubygems