Sha256: a4b3802bafb0ed87b9704e06e0638ba0ed31bbd15fb14481e62242802d1f75c6

Contents?: true

Size: 365 Bytes

Versions: 88

Compression:

Stored size: 365 Bytes

Contents

# frozen_string_literal: true

class AddReferenceToProjects < ActiveRecord::Migration[5.0]
  class Project < ApplicationRecord
    self.table_name = :decidim_budgets_projects
  end

  def change
    add_column :decidim_budgets_projects, :reference, :string
    Project.find_each(&:save)
    change_column_null :decidim_budgets_projects, :reference, false
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
decidim-budgets-0.20.1 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.20.0 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.19.1 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.18.1 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.19.0 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.17.2 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.18.0 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.17.1 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.16.1 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.17.0 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.16.0 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.15.2 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.15.1 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.15.0 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.14.4 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.14.3 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.14.2 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.14.1 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.13.1 db/migrate/20170215132708_add_reference_to_projects.rb
decidim-budgets-0.12.2 db/migrate/20170215132708_add_reference_to_projects.rb