summaryrefslogtreecommitdiff
path: root/db/migrate/20200730101242_create_solidus_subscriptions_subscription_events.rb
blob: 62de91e17a557ed845e25cc1745397cc67cb6a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class CreateSolidusSubscriptionsSubscriptionEvents < ActiveRecord::Migration[5.2]
  def change
    create_table :solidus_subscriptions_subscription_events do |t|
      t.belongs_to(
        :subscription,
        null: false,
        foreign_key: { to_table: :solidus_subscriptions_subscriptions },
        index: { name: :idx_solidus_subscription_events_on_subscription_id },
        type: :integer,
      )
      t.string :event_type, null: false
      t.json :details, null: false

      t.timestamps
    end
  end
end