Sha256: 87f2b22445a31c90c7546612cd119b3b2f160f2f6e4b7a168d546d4e632e5636

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

class CreatePublicSubscriptionsAndEventsTables < ActiveRecord::Migration[5.2]
  def change
    # TODO: You may need to tweak this setup to suit your app's database
    enable_extension "uuid-ossp"

    create_table NulogyMessageBusProducer.subscriptions_table_name, id: :uuid, default: nil do |t|
      t.uuid :subscription_group_id, null: false
      t.string :event_type, null: false, index: { name: "index_nulogy_mb_producer_subscriptions_on_event_type" }
      t.string :topic_name, null: false
      t.string :query, null: false
      t.text :schema_key, null: false

      t.timestamps
    end

    create_table NulogyMessageBusProducer.subscription_events_table_name, id: :uuid, default: nil do |t|
      t.uuid :public_subscription_id, null: false
      t.string :partition_key, null: false
      t.string :topic_name, null: false
      t.uuid :tenant_id, null: false
      t.json :event_json, null: false
      t.column :created_at, :datetime, index: { name: "index_nulogy_mb_producer_subscription_events_on_created_at" }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nulogy_message_bus_producer-3.3.0 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-3.2.1 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-3.2.0 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-3.1.1 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-2.1.1 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-2.1.0 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-2.0.0 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-1.0.4 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-1.0.3 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb
nulogy_message_bus_producer-1.0.2 db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb