nulogy_message_bus_producer 3.7.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03f3807e1992d52e065a17dc00d3fa2b3bc7b2fc3fe85ad938f6374030dbc6fb
4
- data.tar.gz: eae26df87208bb6744aabf0f0cadf22f7fe3e911adefd75954af3c7455931451
3
+ metadata.gz: 39fd54822b024fb203ef732cc6fcd4ac4cf3094d8ae4bd89bf28cd146ea8990d
4
+ data.tar.gz: a08bf9f63ae1a0856080ca4b9c8de14a3775e4af2e1f497f9f1d3f8d0d84145e
5
5
  SHA512:
6
- metadata.gz: 622fd9b24890ceea7604a6b5beb7e9847d72a0d65ebed031e287b752ca917f9692f9e9365fea9b59340e17642e612099fa9d2106f182317904b5650e769552d4
7
- data.tar.gz: 67c696faec09c095ae494371221262c81c8c2bccb0cd4e59bf93c10aabcc05dcec44e189ba081e9b330fdc868da3295f66b396e6a0d505be1bd2c1de743e12a0
6
+ metadata.gz: 0cd935cc924689c51f998724c4c567fa71122e90e0881d84694febd5a8827374aefcef3900b74d5e58dc33a168a3177c469fa9e6f7290c8a2226f421f28f9ea8
7
+ data.tar.gz: 646641af7ed738d175f98ad2e4d50921a329331ee8dcfa55cc6120f972fb3d4777fbd6dc10ec65f8c24620cc0ac2a5b8671b83add5d7c2ad93fca0120f3590dc
data/README.md CHANGED
@@ -168,8 +168,6 @@ end
168
168
  module ExampleDomainPublicApi
169
169
  module Types
170
170
  class SubscriptionType < Types::BaseObject
171
- extend GraphQL::Subscriptions::SubscriptionRoot
172
-
173
171
  description "The subscription root for this schema"
174
172
 
175
173
  field :sku_created,
@@ -277,9 +275,12 @@ rake
277
275
 
278
276
  You must be listed as a gem owner [on rubygems](https://rubygems.org/gems/nulogy_message_bus_producer) to cut a release:
279
277
 
280
- * Merge your changes to `master`
281
278
  * Commit a version bump
282
279
  * Update `lib/nulogy_message_bus_producer/version.rb`
280
+ * Run `cd gems/nulogy_message_bus_producer`
283
281
  * Run `bundle install`
284
282
  * Update the CHANGELOG
283
+ * Run `cd heartbeat_app/backend`
284
+ * Run `bundle`
285
+ * Merge your changes to `master`
285
286
  * Run `bundle exec rake release`
@@ -8,7 +8,7 @@ module NulogyMessageBusProducer
8
8
  # use NulogyMessageBusProducer::PostgresPublicSubscriptions
9
9
  # end
10
10
  #
11
- # It expects that schema to already be registered, or will raise an error.
11
+ # It expects that schema to already be registered, or will raise an error:
12
12
  #
13
13
  # NulogyMessageBusProducer.register_schema("some_schema", "SomeSchema")
14
14
  class PostgresTransport < GraphQL::Subscriptions
@@ -17,10 +17,10 @@ module NulogyMessageBusProducer
17
17
  @schema_key = NulogyMessageBusProducer.resolve_schema_key(schema)
18
18
  end
19
19
 
20
- def each_subscription_id(event)
21
- # The graphql gem camelizes and stringifies the Event's arguments
22
- # See subscriptions#trigger here: graphql-1.11.4/lib/graphql/subscriptions.rb
23
- yield event.arguments.fetch("subscriptionId")
20
+ def execute_all(event, object)
21
+ subscription_id = event.arguments.fetch("subscriptionId")
22
+
23
+ execute(subscription_id, event, object)
24
24
  end
25
25
 
26
26
  def read_subscription(subscription_id)
@@ -39,7 +39,7 @@ module NulogyMessageBusProducer
39
39
  if result["errors"]&.any?
40
40
  NulogyMessageBusProducer.config.handle_event_generation_error(
41
41
  subscription_id: subscription_id,
42
- context: result.query.context.object,
42
+ context: result.query.context,
43
43
  variables: result.query.provided_variables,
44
44
  result: result
45
45
  )
@@ -69,7 +69,7 @@ module NulogyMessageBusProducer
69
69
  private
70
70
 
71
71
  def create_event(subscription_id, result)
72
- company_uuid = result.query.context.object[:company_uuid]
72
+ company_uuid = result.query.root_value[:company_uuid]
73
73
  subscription = find_subscription(subscription_id)
74
74
 
75
75
  SubscriptionEvent.create_or_update(
@@ -50,7 +50,7 @@ module NulogyMessageBusProducer
50
50
 
51
51
  def list?(node, visitor)
52
52
  field_definition = visitor.field_definition
53
- nested_type = field_definition.type_class.type
53
+ nested_type = field_definition.type
54
54
 
55
55
  loop do
56
56
  @nodes_are_lists << node if nested_type.is_a?(GraphQL::Schema::List)
@@ -1,3 +1,3 @@
1
1
  module NulogyMessageBusProducer
2
- VERSION = "3.7.0".freeze
2
+ VERSION = "5.0.0".freeze
3
3
  end
@@ -125,10 +125,10 @@ module NulogyMessageBusProducer
125
125
  def subscriptions_exist?
126
126
  ActiveRecord::Base
127
127
  .connection
128
- .exec_query(<<~SQL).present?
128
+ .exec_query(<<~SQL, "SQL", NulogyMessageBusProducer.subscriptions_table_name).present?
129
129
  SELECT tablename
130
130
  FROM pg_tables
131
- WHERE tablename = '#{NulogyMessageBusProducer.subscriptions_table_name}'
131
+ WHERE tablename = '$1'
132
132
  AND schemaname = 'public';
133
133
  SQL
134
134
  rescue # rubocop:disable Style/RescueStandardError
@@ -0,0 +1,143 @@
1
+  (346.8ms) CREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'
2
+  (4.0ms) CREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'
3
+ SQL (2.7ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
4
+ SQL (25.5ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
5
+  (1.3ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
6
+  (8.7ms) CREATE TABLE "message_bus_subscription_events" ("id" uuid NOT NULL PRIMARY KEY, "subscription_id" uuid NOT NULL, "partition_key" character varying NOT NULL, "topic_name" character varying NOT NULL, "company_uuid" uuid NOT NULL, "event_json" json NOT NULL, "created_at" timestamp)
7
+  (4.9ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
8
+  (1.2ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
9
+  (7.6ms) CREATE TABLE "message_bus_subscriptions" ("id" uuid NOT NULL PRIMARY KEY, "subscription_group_id" uuid NOT NULL, "event_type" character varying NOT NULL, "topic_name" character varying NOT NULL, "query" character varying NOT NULL, "schema_key" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
10
+  (4.6ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
11
+  (7.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
12
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
13
+  (3.2ms) INSERT INTO "schema_migrations" (version) VALUES (20201005164116)
14
+  (2.7ms) INSERT INTO "schema_migrations" (version) VALUES
15
+ (20200611150212),
16
+ (20201005150212);
17
+
18
+ 
19
+  (8.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)
20
+ ActiveRecord::InternalMetadata Load (1.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
21
+ TRANSACTION (1.3ms) BEGIN
22
+ ActiveRecord::InternalMetadata Create (2.0ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2022-03-21 18:18:38.658673"], ["updated_at", "2022-03-21 18:18:38.658673"]]
23
+ TRANSACTION (2.5ms) COMMIT
24
+ ActiveRecord::InternalMetadata Load (1.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
25
+ ActiveRecord::InternalMetadata Load (1.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "schema_sha1"], ["LIMIT", 1]]
26
+ TRANSACTION (1.6ms) BEGIN
27
+ ActiveRecord::InternalMetadata Create (1.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "schema_sha1"], ["value", "2d5bee88577a387c3beb2618b50260b1d5b2a437"], ["created_at", "2022-03-21 18:18:38.675644"], ["updated_at", "2022-03-21 18:18:38.675644"]]
28
+ TRANSACTION (2.7ms) COMMIT
29
+ SQL (3.6ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
30
+ SQL (25.3ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
31
+  (1.2ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
32
+  (28.7ms) CREATE TABLE "message_bus_subscription_events" ("id" uuid NOT NULL PRIMARY KEY, "subscription_id" uuid NOT NULL, "partition_key" character varying NOT NULL, "topic_name" character varying NOT NULL, "company_uuid" uuid NOT NULL, "event_json" json NOT NULL, "created_at" timestamp)
33
+  (4.7ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
34
+  (1.2ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
35
+  (7.2ms) CREATE TABLE "message_bus_subscriptions" ("id" uuid NOT NULL PRIMARY KEY, "subscription_group_id" uuid NOT NULL, "event_type" character varying NOT NULL, "topic_name" character varying NOT NULL, "query" character varying NOT NULL, "schema_key" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
36
+  (4.5ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
37
+  (14.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
38
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
39
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES (20201005164116)
40
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES
41
+ (20200611150212),
42
+ (20201005150212);
43
+
44
+ 
45
+  (7.3ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)
46
+ ActiveRecord::InternalMetadata Load (1.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
47
+ TRANSACTION (1.3ms) BEGIN
48
+ ActiveRecord::InternalMetadata Create (1.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2022-03-21 18:18:38.841097"], ["updated_at", "2022-03-21 18:18:38.841097"]]
49
+ TRANSACTION (2.3ms) COMMIT
50
+ ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
51
+ TRANSACTION (1.3ms) BEGIN
52
+ ActiveRecord::InternalMetadata Update (1.4ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2022-03-21 18:18:38.851953"], ["key", "environment"]]
53
+ TRANSACTION (2.0ms) COMMIT
54
+ ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "schema_sha1"], ["LIMIT", 1]]
55
+ TRANSACTION (1.2ms) BEGIN
56
+ ActiveRecord::InternalMetadata Create (1.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "schema_sha1"], ["value", "2d5bee88577a387c3beb2618b50260b1d5b2a437"], ["created_at", "2022-03-21 18:18:38.861253"], ["updated_at", "2022-03-21 18:18:38.861253"]]
57
+ TRANSACTION (2.1ms) COMMIT
58
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
59
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
60
+  (1.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
61
+  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
62
+  (1.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
63
+  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
64
+  (1.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
65
+  (5066.7ms) DROP DATABASE IF EXISTS "nulogy_message_bus_producer_test"
66
+  (2.6ms) CREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'
67
+  (2.2ms) CREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'
68
+  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
69
+  (1.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
70
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
71
+  (2.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
72
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
73
+  (1.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
74
+ SQL (1.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
75
+ SQL (1.6ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
76
+  (3.4ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
77
+  (8.6ms) CREATE TABLE "message_bus_subscription_events" ("id" uuid NOT NULL PRIMARY KEY, "subscription_id" uuid NOT NULL, "partition_key" character varying NOT NULL, "topic_name" character varying NOT NULL, "company_uuid" uuid NOT NULL, "event_json" json NOT NULL, "created_at" timestamp)
78
+  (5.6ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
79
+  (3.7ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
80
+  (9.6ms) CREATE TABLE "message_bus_subscriptions" ("id" uuid NOT NULL PRIMARY KEY, "subscription_group_id" uuid NOT NULL, "event_type" character varying NOT NULL, "topic_name" character varying NOT NULL, "query" character varying NOT NULL, "schema_key" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
81
+  (5.4ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
82
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
83
+ ActiveRecord::InternalMetadata Load (1.8ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
84
+ ActiveRecord::InternalMetadata Load (1.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
85
+ ActiveRecord::InternalMetadata Load (1.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "schema_sha1"], ["LIMIT", 1]]
86
+ SQL (1.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
87
+ SQL (1.4ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
88
+  (5.6ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
89
+  (8.5ms) CREATE TABLE "message_bus_subscription_events" ("id" uuid NOT NULL PRIMARY KEY, "subscription_id" uuid NOT NULL, "partition_key" character varying NOT NULL, "topic_name" character varying NOT NULL, "company_uuid" uuid NOT NULL, "event_json" json NOT NULL, "created_at" timestamp)
90
+  (4.4ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
91
+  (2.6ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
92
+  (7.4ms) CREATE TABLE "message_bus_subscriptions" ("id" uuid NOT NULL PRIMARY KEY, "subscription_group_id" uuid NOT NULL, "event_type" character varying NOT NULL, "topic_name" character varying NOT NULL, "query" character varying NOT NULL, "schema_key" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
93
+  (4.7ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
94
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
95
+ ActiveRecord::InternalMetadata Load (1.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
96
+ TRANSACTION (1.2ms) BEGIN
97
+ ActiveRecord::InternalMetadata Update (1.4ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "development"], ["updated_at", "2022-03-21 18:19:41.472492"], ["key", "environment"]]
98
+ TRANSACTION (3.2ms) COMMIT
99
+ ActiveRecord::InternalMetadata Load (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
100
+ TRANSACTION (1.0ms) BEGIN
101
+ ActiveRecord::InternalMetadata Update (1.2ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2022-03-21 18:19:41.484047"], ["key", "environment"]]
102
+ TRANSACTION (2.0ms) COMMIT
103
+ ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "schema_sha1"], ["LIMIT", 1]]
104
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
105
+  (1.5ms) CREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'
106
+  (2.2ms) CREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'
107
+  (3.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
108
+  (2.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
109
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
110
+  (1.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
111
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
112
+  (1.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
113
+ SQL (2.6ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
114
+ SQL (1.1ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
115
+  (12.2ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
116
+  (25.4ms) CREATE TABLE "message_bus_subscription_events" ("id" uuid NOT NULL PRIMARY KEY, "subscription_id" uuid NOT NULL, "partition_key" character varying NOT NULL, "topic_name" character varying NOT NULL, "company_uuid" uuid NOT NULL, "event_json" json NOT NULL, "created_at" timestamp)
117
+  (3.5ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
118
+  (2.4ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
119
+  (5.5ms) CREATE TABLE "message_bus_subscriptions" ("id" uuid NOT NULL PRIMARY KEY, "subscription_group_id" uuid NOT NULL, "event_type" character varying NOT NULL, "topic_name" character varying NOT NULL, "query" character varying NOT NULL, "schema_key" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
120
+  (3.6ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
121
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
122
+ ActiveRecord::InternalMetadata Load (1.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
123
+ ActiveRecord::InternalMetadata Load (1.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
124
+ ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "schema_sha1"], ["LIMIT", 1]]
125
+ SQL (2.9ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
126
+ SQL (1.2ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
127
+  (13.5ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
128
+  (26.1ms) CREATE TABLE "message_bus_subscription_events" ("id" uuid NOT NULL PRIMARY KEY, "subscription_id" uuid NOT NULL, "partition_key" character varying NOT NULL, "topic_name" character varying NOT NULL, "company_uuid" uuid NOT NULL, "event_json" json NOT NULL, "created_at" timestamp)
129
+  (3.7ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
130
+  (2.2ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
131
+  (6.6ms) CREATE TABLE "message_bus_subscriptions" ("id" uuid NOT NULL PRIMARY KEY, "subscription_group_id" uuid NOT NULL, "event_type" character varying NOT NULL, "topic_name" character varying NOT NULL, "query" character varying NOT NULL, "schema_key" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
132
+  (4.0ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
133
+  (2.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
134
+ ActiveRecord::InternalMetadata Load (2.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
135
+ TRANSACTION (1.1ms) BEGIN
136
+ ActiveRecord::InternalMetadata Update (1.2ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "development"], ["updated_at", "2022-04-13 18:39:07.159878"], ["key", "environment"]]
137
+ TRANSACTION (1.9ms) COMMIT
138
+ ActiveRecord::InternalMetadata Load (1.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
139
+ TRANSACTION (1.1ms) BEGIN
140
+ ActiveRecord::InternalMetadata Update (1.3ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2022-04-13 18:39:07.169835"], ["key", "environment"]]
141
+ TRANSACTION (1.7ms) COMMIT
142
+ ActiveRecord::InternalMetadata Load (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "schema_sha1"], ["LIMIT", 1]]
143
+  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC