Sha256: e8959dab582fceac253f48cda90af0232f6233808550bcf18091f280c622d95e

Contents?: true

Size: 620 Bytes

Versions: 3

Compression:

Stored size: 620 Bytes

Contents

# frozen_string_literal: true

class ChangeNotifyNotesAuthors < ActiveRecord::Migration[5.2]
  def change
    add_reference :decidim_notify_notes,
                  :decidim_creator,
                  index: { name: "index_decidim_notify_notes_on_decidim_creator_id" },
                  foreign_key: { to_table: :decidim_users }
    add_reference :decidim_notify_notes,
                  :decidim_author,
                  index: { name: "index_decidim_notify_notes_on_decidim_author_id" },
                  foreign_key: { to_table: :decidim_users }
    remove_column :decidim_notify_notes, :decidim_user_id
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-notify-0.5 db/migrate/20200507103034_change_notify_notes_authors.rb
decidim-notify-0.4 db/migrate/20200507103034_change_notify_notes_authors.rb
decidim-notify-0.3 db/migrate/20200507103034_change_notify_notes_authors.rb