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 +4 -4
- data/README.md +4 -3
- data/lib/nulogy_message_bus_producer/subscriptions/postgres_transport.rb +7 -7
- data/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker.rb +1 -1
- data/lib/nulogy_message_bus_producer/version.rb +1 -1
- data/lib/nulogy_message_bus_producer.rb +2 -2
- data/spec/dummy/log/development.log +143 -0
- data/spec/dummy/log/test.log +859 -0
- metadata +10 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39fd54822b024fb203ef732cc6fcd4ac4cf3094d8ae4bd89bf28cd146ea8990d
|
4
|
+
data.tar.gz: a08bf9f63ae1a0856080ca4b9c8de14a3775e4af2e1f497f9f1d3f8d0d84145e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
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.
|
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.
|
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)
|
@@ -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 = '
|
131
|
+
WHERE tablename = '$1'
|
132
132
|
AND schemaname = 'public';
|
133
133
|
SQL
|
134
134
|
rescue # rubocop:disable Style/RescueStandardError
|
@@ -0,0 +1,143 @@
|
|
1
|
+
[1m[35m (346.8ms)[0m [1m[35mCREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'[0m
|
2
|
+
[1m[35m (4.0ms)[0m [1m[35mCREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'[0m
|
3
|
+
[1m[35mSQL (2.7ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
4
|
+
[1m[35mSQL (25.5ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
5
|
+
[1m[35m (1.3ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE[0m
|
6
|
+
[1m[35m (8.7ms)[0m [1m[35mCREATE 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)[0m
|
7
|
+
[1m[35m (4.9ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")[0m
|
8
|
+
[1m[35m (1.2ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE[0m
|
9
|
+
[1m[35m (7.6ms)[0m [1m[35mCREATE 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)[0m
|
10
|
+
[1m[35m (4.6ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")[0m
|
11
|
+
[1m[35m (7.4ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
12
|
+
[1m[35m (2.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
13
|
+
[1m[35m (3.2ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20201005164116)[0m
|
14
|
+
[1m[35m (2.7ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
15
|
+
(20200611150212),
|
16
|
+
(20201005150212);
|
17
|
+
|
18
|
+
[0m
|
19
|
+
[1m[35m (8.6ms)[0m [1m[35mCREATE 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)[0m
|
20
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
21
|
+
[1m[36mTRANSACTION (1.3ms)[0m [1m[35mBEGIN[0m
|
22
|
+
[1m[36mActiveRecord::InternalMetadata Create (2.0ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2022-03-21 18:18:38.658673"], ["updated_at", "2022-03-21 18:18:38.658673"]]
|
23
|
+
[1m[36mTRANSACTION (2.5ms)[0m [1m[35mCOMMIT[0m
|
24
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
25
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.7ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
26
|
+
[1m[36mTRANSACTION (1.6ms)[0m [1m[35mBEGIN[0m
|
27
|
+
[1m[36mActiveRecord::InternalMetadata Create (1.7ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "schema_sha1"], ["value", "2d5bee88577a387c3beb2618b50260b1d5b2a437"], ["created_at", "2022-03-21 18:18:38.675644"], ["updated_at", "2022-03-21 18:18:38.675644"]]
|
28
|
+
[1m[36mTRANSACTION (2.7ms)[0m [1m[35mCOMMIT[0m
|
29
|
+
[1m[35mSQL (3.6ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
30
|
+
[1m[35mSQL (25.3ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
31
|
+
[1m[35m (1.2ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE[0m
|
32
|
+
[1m[35m (28.7ms)[0m [1m[35mCREATE 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)[0m
|
33
|
+
[1m[35m (4.7ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")[0m
|
34
|
+
[1m[35m (1.2ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE[0m
|
35
|
+
[1m[35m (7.2ms)[0m [1m[35mCREATE 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)[0m
|
36
|
+
[1m[35m (4.5ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")[0m
|
37
|
+
[1m[35m (14.7ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
38
|
+
[1m[35m (1.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
39
|
+
[1m[35m (2.1ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20201005164116)[0m
|
40
|
+
[1m[35m (2.0ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
41
|
+
(20200611150212),
|
42
|
+
(20201005150212);
|
43
|
+
|
44
|
+
[0m
|
45
|
+
[1m[35m (7.3ms)[0m [1m[35mCREATE 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)[0m
|
46
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
47
|
+
[1m[36mTRANSACTION (1.3ms)[0m [1m[35mBEGIN[0m
|
48
|
+
[1m[36mActiveRecord::InternalMetadata Create (1.4ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2022-03-21 18:18:38.841097"], ["updated_at", "2022-03-21 18:18:38.841097"]]
|
49
|
+
[1m[36mTRANSACTION (2.3ms)[0m [1m[35mCOMMIT[0m
|
50
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
51
|
+
[1m[36mTRANSACTION (1.3ms)[0m [1m[35mBEGIN[0m
|
52
|
+
[1m[36mActiveRecord::InternalMetadata Update (1.4ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2022-03-21 18:18:38.851953"], ["key", "environment"]]
|
53
|
+
[1m[36mTRANSACTION (2.0ms)[0m [1m[35mCOMMIT[0m
|
54
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
55
|
+
[1m[36mTRANSACTION (1.2ms)[0m [1m[35mBEGIN[0m
|
56
|
+
[1m[36mActiveRecord::InternalMetadata Create (1.5ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "schema_sha1"], ["value", "2d5bee88577a387c3beb2618b50260b1d5b2a437"], ["created_at", "2022-03-21 18:18:38.861253"], ["updated_at", "2022-03-21 18:18:38.861253"]]
|
57
|
+
[1m[36mTRANSACTION (2.1ms)[0m [1m[35mCOMMIT[0m
|
58
|
+
[1m[35m (1.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
59
|
+
[1m[35m (2.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
60
|
+
[1m[35m (1.6ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
61
|
+
[1m[35m (1.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
62
|
+
[1m[35m (1.6ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
63
|
+
[1m[35m (1.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
64
|
+
[1m[35m (1.5ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
65
|
+
[1m[35m (5066.7ms)[0m [1m[35mDROP DATABASE IF EXISTS "nulogy_message_bus_producer_test"[0m
|
66
|
+
[1m[35m (2.6ms)[0m [1m[35mCREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'[0m
|
67
|
+
[1m[35m (2.2ms)[0m [1m[35mCREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'[0m
|
68
|
+
[1m[35m (2.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
69
|
+
[1m[35m (1.7ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
70
|
+
[1m[35m (1.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
71
|
+
[1m[35m (2.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
72
|
+
[1m[35m (1.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
73
|
+
[1m[35m (1.7ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
74
|
+
[1m[35mSQL (1.5ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
75
|
+
[1m[35mSQL (1.6ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
76
|
+
[1m[35m (3.4ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE[0m
|
77
|
+
[1m[35m (8.6ms)[0m [1m[35mCREATE 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)[0m
|
78
|
+
[1m[35m (5.6ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")[0m
|
79
|
+
[1m[35m (3.7ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE[0m
|
80
|
+
[1m[35m (9.6ms)[0m [1m[35mCREATE 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)[0m
|
81
|
+
[1m[35m (5.4ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")[0m
|
82
|
+
[1m[35m (1.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
83
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
84
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
85
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
86
|
+
[1m[35mSQL (1.3ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
87
|
+
[1m[35mSQL (1.4ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
88
|
+
[1m[35m (5.6ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE[0m
|
89
|
+
[1m[35m (8.5ms)[0m [1m[35mCREATE 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)[0m
|
90
|
+
[1m[35m (4.4ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")[0m
|
91
|
+
[1m[35m (2.6ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE[0m
|
92
|
+
[1m[35m (7.4ms)[0m [1m[35mCREATE 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)[0m
|
93
|
+
[1m[35m (4.7ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")[0m
|
94
|
+
[1m[35m (1.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
95
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
96
|
+
[1m[36mTRANSACTION (1.2ms)[0m [1m[35mBEGIN[0m
|
97
|
+
[1m[36mActiveRecord::InternalMetadata Update (1.4ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "development"], ["updated_at", "2022-03-21 18:19:41.472492"], ["key", "environment"]]
|
98
|
+
[1m[36mTRANSACTION (3.2ms)[0m [1m[35mCOMMIT[0m
|
99
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
100
|
+
[1m[36mTRANSACTION (1.0ms)[0m [1m[35mBEGIN[0m
|
101
|
+
[1m[36mActiveRecord::InternalMetadata Update (1.2ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2022-03-21 18:19:41.484047"], ["key", "environment"]]
|
102
|
+
[1m[36mTRANSACTION (2.0ms)[0m [1m[35mCOMMIT[0m
|
103
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
104
|
+
[1m[35m (1.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
105
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'[0m
|
106
|
+
[1m[35m (2.2ms)[0m [1m[35mCREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'[0m
|
107
|
+
[1m[35m (3.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
108
|
+
[1m[35m (2.6ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
109
|
+
[1m[35m (1.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
110
|
+
[1m[35m (1.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
111
|
+
[1m[35m (1.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
112
|
+
[1m[35m (1.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
113
|
+
[1m[35mSQL (2.6ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
114
|
+
[1m[35mSQL (1.1ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
115
|
+
[1m[35m (12.2ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE[0m
|
116
|
+
[1m[35m (25.4ms)[0m [1m[35mCREATE 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)[0m
|
117
|
+
[1m[35m (3.5ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")[0m
|
118
|
+
[1m[35m (2.4ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE[0m
|
119
|
+
[1m[35m (5.5ms)[0m [1m[35mCREATE 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)[0m
|
120
|
+
[1m[35m (3.6ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")[0m
|
121
|
+
[1m[35m (1.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
122
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
123
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
124
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
125
|
+
[1m[35mSQL (2.9ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
126
|
+
[1m[35mSQL (1.2ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
127
|
+
[1m[35m (13.5ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE[0m
|
128
|
+
[1m[35m (26.1ms)[0m [1m[35mCREATE 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)[0m
|
129
|
+
[1m[35m (3.7ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")[0m
|
130
|
+
[1m[35m (2.2ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE[0m
|
131
|
+
[1m[35m (6.6ms)[0m [1m[35mCREATE 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)[0m
|
132
|
+
[1m[35m (4.0ms)[0m [1m[35mCREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")[0m
|
133
|
+
[1m[35m (2.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
134
|
+
[1m[36mActiveRecord::InternalMetadata Load (2.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
135
|
+
[1m[36mTRANSACTION (1.1ms)[0m [1m[35mBEGIN[0m
|
136
|
+
[1m[36mActiveRecord::InternalMetadata Update (1.2ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "development"], ["updated_at", "2022-04-13 18:39:07.159878"], ["key", "environment"]]
|
137
|
+
[1m[36mTRANSACTION (1.9ms)[0m [1m[35mCOMMIT[0m
|
138
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
139
|
+
[1m[36mTRANSACTION (1.1ms)[0m [1m[35mBEGIN[0m
|
140
|
+
[1m[36mActiveRecord::InternalMetadata Update (1.3ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2022-04-13 18:39:07.169835"], ["key", "environment"]]
|
141
|
+
[1m[36mTRANSACTION (1.7ms)[0m [1m[35mCOMMIT[0m
|
142
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
143
|
+
[1m[35m (1.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|