Sha256: ea08e26e1929baa0119970c728a3f64dfee76941aae94afd40499a319573012e

Contents?: true

Size: 845 Bytes

Versions: 8

Compression:

Stored size: 845 Bytes

Contents

class NotificationSettingsMigration < ActiveRecord::Migration<%= migration_version %>
    def change
        add_column :notifications, :subscription_id, :bigint, index: true
        add_column :notifications, :category, :string, index: true

        create_table :notification_settings_settings do |t|

            t.references :object, polymorphic: true, index: true
            t.references :subscription, index: true

            t.string :status

            t.text :settings
            t.text :category_settings

            t.timestamps

        end

        create_table :notification_settings_subscriptions do |t|

            t.references :subscriber, polymorphic: true, index: true
            t.references :subscribable, polymorphic: true, index: true

            t.timestamps

        end
    end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
notification-settings-1.1.1 lib/generators/templates/install/notifications_migration.rb.erb
notification-settings-1.1.0 lib/generators/templates/install/notifications_migration.rb.erb
notification-settings-1.0.0 lib/generators/templates/install/notifications_migration.rb.erb
notification-settings-1.0.0.beta11 lib/generators/templates/install/notifications_migration.rb.erb
notification-settings-1.0.0.beta10 lib/generators/templates/install/notifications_migration.rb.erb
notification-settings-1.0.0.beta9 lib/generators/templates/install/notifications_migration.rb.erb
notification-settings-1.0.0.beta8 lib/generators/templates/install/notifications_migration.rb.erb
notification-settings-1.0.0.beta7 lib/generators/templates/install/notifications_migration.rb.erb