1 # frozen_string_literal: true
3 # This is a composite of the migrations generated by the gem Noticed
4 # with `rails noticed:install:migrations`. They are as per version 3.0
5 # of the gem: https://github.com/excid3/noticed/tree/v3.0.0/db/migrate,
6 # plus some tweaks to remove unnecessary code.
7 class CreateNoticedTables < ActiveRecord::Migration[8.1]
9 create_table :noticed_events do |t|
11 t.belongs_to :record, :polymorphic => true
12 t.integer :notifications_count
14 if t.respond_to?(:jsonb)
23 create_table :noticed_notifications do |t|
25 t.belongs_to :event, :null => false
26 t.belongs_to :recipient, :polymorphic => true, :null => false