nulogy_message_bus_producer 3.2.1 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +82 -22
  3. data/Rakefile +2 -4
  4. data/db/migrate/20200611150212_create_public_subscriptions_and_events_tables.rb +2 -2
  5. data/lib/nulogy_message_bus_producer.rb +15 -8
  6. data/lib/nulogy_message_bus_producer/base_subscription.rb +1 -1
  7. data/lib/nulogy_message_bus_producer/config.rb +25 -1
  8. data/lib/nulogy_message_bus_producer/configuration/query_parser.rb +71 -0
  9. data/lib/nulogy_message_bus_producer/self_serve_subscription.rb +18 -0
  10. data/lib/nulogy_message_bus_producer/subscriptions/configured_subscription.rb +14 -0
  11. data/lib/nulogy_message_bus_producer/subscriptions/finder.rb +40 -0
  12. data/lib/nulogy_message_bus_producer/subscriptions/postgres_transport.rb +13 -6
  13. data/lib/nulogy_message_bus_producer/subscriptions/query_validator.rb +47 -0
  14. data/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker.rb +0 -5
  15. data/lib/nulogy_message_bus_producer/subscriptions/valid_for_schema_validator.rb +14 -0
  16. data/lib/nulogy_message_bus_producer/version.rb +1 -1
  17. data/spec/dummy/Rakefile +1 -1
  18. data/spec/dummy/app/mailers/application_mailer.rb +2 -2
  19. data/spec/dummy/bin/bundle +2 -2
  20. data/spec/dummy/bin/rails +3 -3
  21. data/spec/dummy/bin/rake +2 -2
  22. data/spec/dummy/bin/setup +14 -16
  23. data/spec/dummy/bin/update +10 -10
  24. data/spec/dummy/bin/yarn +13 -7
  25. data/spec/dummy/config.ru +2 -1
  26. data/spec/dummy/config/application.rb +11 -6
  27. data/spec/dummy/config/boot.rb +2 -4
  28. data/spec/dummy/config/cable.yml +2 -2
  29. data/spec/dummy/config/database.yml +2 -2
  30. data/spec/dummy/config/environment.rb +1 -1
  31. data/spec/dummy/config/environments/development.rb +29 -7
  32. data/spec/dummy/config/environments/production.rb +50 -20
  33. data/spec/dummy/config/environments/test.rb +25 -8
  34. data/spec/dummy/config/initializers/assets.rb +2 -2
  35. data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
  36. data/spec/dummy/config/initializers/content_security_policy.rb +30 -0
  37. data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
  38. data/spec/dummy/config/initializers/new_framework_defaults_6_1.rb +67 -0
  39. data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
  40. data/spec/dummy/config/locales/en.yml +1 -1
  41. data/spec/dummy/config/puma.rb +3 -3
  42. data/spec/dummy/config/spring.rb +2 -2
  43. data/spec/dummy/config/storage.yml +34 -0
  44. data/spec/dummy/db/schema.rb +0 -2
  45. data/spec/dummy/log/development.log +317 -0
  46. data/spec/dummy/log/test.log +13164 -0
  47. data/spec/integration/lib/nulogy_message_bus_producer/config_spec.rb +37 -0
  48. data/spec/integration/lib/nulogy_message_bus_producer/repopulate_replication_slots_spec.rb +6 -7
  49. data/spec/integration/lib/nulogy_message_bus_producer/subscription_spec.rb +3 -57
  50. data/spec/integration/lib/nulogy_message_bus_producer/subscriptions/finder_spec.rb +54 -0
  51. data/spec/integration/lib/nulogy_message_bus_producer/subscriptions/no_variables_spec.rb +1 -1
  52. data/spec/integration/lib/nulogy_message_bus_producer/subscriptions/postgres_transport_spec.rb +100 -54
  53. data/spec/integration/lib/nulogy_message_bus_producer/{subscriber_graphql_schema_validator_spec.rb → subscriptions/query_validator_spec.rb} +3 -3
  54. data/spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb +0 -16
  55. data/spec/integration_spec_helper.rb +0 -6
  56. data/spec/nulogy_message_bus_producer/configuration/query_parser_spec.rb +58 -0
  57. data/spec/nulogy_message_bus_producer/subscriptions/subscription_spec.rb +9 -0
  58. data/spec/spec_helper.rb +26 -1
  59. data/spec/support/kafka.rb +9 -10
  60. data/spec/support/kafka_connect.rb +1 -1
  61. data/spec/support/shared_examples/subscription_validations.rb +77 -0
  62. data/spec/support/skip.rb +9 -0
  63. data/spec/support/sql_helpers.rb +1 -1
  64. data/spec/support/subscription_helpers.rb +22 -4
  65. data/spec/support/test_graphql_schema.rb +6 -2
  66. metadata +131 -79
  67. data/lib/nulogy_message_bus_producer/subscriber_graphql_schema_validator.rb +0 -45
  68. data/lib/nulogy_message_bus_producer/subscription.rb +0 -28
@@ -1,3 +1,5 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  Rails.application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
@@ -11,35 +13,35 @@ Rails.application.configure do
11
13
  config.eager_load = true
12
14
 
13
15
  # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
16
+ config.consider_all_requests_local = false
15
17
  config.action_controller.perform_caching = true
16
18
 
17
- # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
18
- # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
19
- # `config/secrets.yml.key`.
19
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
20
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21
+ # config.require_master_key = true
20
22
  config.read_encrypted_secrets = false
21
23
 
22
24
  # Disable serving static files from the `/public` folder by default since
23
25
  # Apache or NGINX already handles this.
24
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
+ config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
25
27
 
26
- # Compress JavaScripts and CSS.
27
- config.assets.js_compressor = :uglifier
28
+ # Compress CSS using a preprocessor.
28
29
  # config.assets.css_compressor = :sass
29
30
 
30
31
  # Do not fallback to assets pipeline if a precompiled asset is missed.
31
32
  config.assets.compile = false
32
33
 
33
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
34
-
35
34
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
36
- # config.action_controller.asset_host = 'http://assets.example.com'
35
+ # config.asset_host = 'http://assets.example.com'
37
36
 
38
37
  # Specifies the header that your server uses for sending files.
39
38
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
40
39
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
41
40
 
42
- # Mount Action Cable outside main process or domain
41
+ # Store uploaded files on the local file system (see config/storage.yml for options).
42
+ config.active_storage.service = :local
43
+
44
+ # Mount Action Cable outside main process or domain.
43
45
  # config.action_cable.mount_path = nil
44
46
  # config.action_cable.url = 'wss://example.com/cable'
45
47
  # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
@@ -47,19 +49,20 @@ Rails.application.configure do
47
49
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
48
50
  # config.force_ssl = true
49
51
 
50
- # Use the lowest log level to ensure availability of diagnostic information
51
- # when problems arise.
52
- config.log_level = :debug
52
+ # Include generic and useful information about system operation, but avoid logging too much
53
+ # information to avoid inadvertent exposure of personally identifiable information (PII).
54
+ config.log_level = :info
53
55
 
54
56
  # Prepend all log lines with the following tags.
55
- config.log_tags = [ :request_id ]
57
+ config.log_tags = [:request_id]
56
58
 
57
59
  # Use a different cache store in production.
58
60
  # config.cache_store = :mem_cache_store
59
61
 
60
- # Use a real queuing backend for Active Job (and separate queues per environment)
62
+ # Use a real queuing backend for Active Job (and separate queues per environment).
61
63
  # config.active_job.queue_adapter = :resque
62
- # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
64
+ # config.active_job.queue_name_prefix = "dummy_production"
65
+
63
66
  config.action_mailer.perform_caching = false
64
67
 
65
68
  # Ignore bad email addresses and do not raise email delivery errors.
@@ -73,19 +76,46 @@ Rails.application.configure do
73
76
  # Send deprecation notices to registered listeners.
74
77
  config.active_support.deprecation = :notify
75
78
 
79
+ # Log disallowed deprecations.
80
+ config.active_support.disallowed_deprecation = :log
81
+
82
+ # Tell Active Support which deprecation messages to disallow.
83
+ config.active_support.disallowed_deprecation_warnings = []
84
+
76
85
  # Use default logging formatter so that PID and timestamp are not suppressed.
77
86
  config.log_formatter = ::Logger::Formatter.new
78
87
 
79
88
  # Use a different logger for distributed setups.
80
- # require 'syslog/logger'
89
+ # require "syslog/logger"
81
90
  # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
82
91
 
83
92
  if ENV["RAILS_LOG_TO_STDOUT"].present?
84
- logger = ActiveSupport::Logger.new(STDOUT)
93
+ logger = ActiveSupport::Logger.new($stdout)
85
94
  logger.formatter = config.log_formatter
86
- config.logger = ActiveSupport::TaggedLogging.new(logger)
95
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
87
96
  end
88
97
 
89
98
  # Do not dump schema after migrations.
90
99
  config.active_record.dump_schema_after_migration = false
100
+
101
+ # Inserts middleware to perform automatic connection switching.
102
+ # The `database_selector` hash is used to pass options to the DatabaseSelector
103
+ # middleware. The `delay` is used to determine how long to wait after a write
104
+ # to send a subsequent read to the primary.
105
+ #
106
+ # The `database_resolver` class is used by the middleware to determine which
107
+ # database is appropriate to use based on the time delay.
108
+ #
109
+ # The `database_resolver_context` class is used by the middleware to set
110
+ # timestamps for the last write to the primary. The resolver uses the context
111
+ # class timestamps to determine how long to wait before reading from the
112
+ # replica.
113
+ #
114
+ # By default Rails will store a last write timestamp in the session. The
115
+ # DatabaseSelector middleware is designed as such you can define your own
116
+ # strategy for connection switching and pass that into the middleware through
117
+ # these configuration options.
118
+ # config.active_record.database_selector = { delay: 2.seconds }
119
+ # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
120
+ # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
91
121
  end
@@ -1,10 +1,13 @@
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+
1
8
  Rails.application.configure do
2
9
  # Settings specified here will take precedence over those in config/application.rb.
3
10
 
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
11
  config.cache_classes = true
9
12
 
10
13
  # Do not eager load code on boot. This avoids loading your whole application
@@ -15,18 +18,23 @@ Rails.application.configure do
15
18
  # Configure public file server for tests with Cache-Control for performance.
16
19
  config.public_file_server.enabled = true
17
20
  config.public_file_server.headers = {
18
- 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
21
+ "Cache-Control" => "public, max-age=#{1.hour.to_i}"
19
22
  }
20
23
 
21
24
  # Show full error reports and disable caching.
22
- config.consider_all_requests_local = true
25
+ config.consider_all_requests_local = true
23
26
  config.action_controller.perform_caching = false
27
+ config.cache_store = :null_store
24
28
 
25
29
  # Raise exceptions instead of rendering exception templates.
26
30
  config.action_dispatch.show_exceptions = false
27
31
 
28
32
  # Disable request forgery protection in test environment.
29
33
  config.action_controller.allow_forgery_protection = false
34
+
35
+ # Store uploaded files on the local file system in a temporary directory.
36
+ config.active_storage.service = :test
37
+
30
38
  config.action_mailer.perform_caching = false
31
39
 
32
40
  # Tell Action Mailer not to deliver emails to the real world.
@@ -37,6 +45,15 @@ Rails.application.configure do
37
45
  # Print deprecation notices to the stderr.
38
46
  config.active_support.deprecation = :stderr
39
47
 
40
- # Raises error for missing translations
41
- # config.action_view.raise_on_missing_translations = true
48
+ # Raise exceptions for disallowed deprecations.
49
+ config.active_support.disallowed_deprecation = :raise
50
+
51
+ # Tell Active Support which deprecation messages to disallow.
52
+ config.active_support.disallowed_deprecation_warnings = []
53
+
54
+ # Raises error for missing translations.
55
+ # config.i18n.raise_on_missing_translations = true
56
+
57
+ # Annotate rendered view with file names.
58
+ # config.action_view.annotate_rendered_view_with_filenames = true
42
59
  end
@@ -1,12 +1,12 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Version of your assets, change this if you want to expire all your assets.
4
- Rails.application.config.assets.version = '1.0'
4
+ Rails.application.config.assets.version = "1.0"
5
5
 
6
6
  # Add additional assets to the asset load path.
7
7
  # Rails.application.config.assets.paths << Emoji.images_path
8
8
  # Add Yarn node_modules folder to the asset load path.
9
- Rails.application.config.assets.paths << Rails.root.join('node_modules')
9
+ Rails.application.config.assets.paths << Rails.root.join("node_modules")
10
10
 
11
11
  # Precompile additional assets.
12
12
  # application.js, application.css, and all non-JS/CSS in the app/assets
@@ -1,7 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
4
+ # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
5
5
 
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
7
+ # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
8
+ Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
@@ -0,0 +1,30 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy
4
+ # For further information see the following documentation
5
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6
+
7
+ # Rails.application.config.content_security_policy do |policy|
8
+ # policy.default_src :self, :https
9
+ # policy.font_src :self, :https, :data
10
+ # policy.img_src :self, :https, :data
11
+ # policy.object_src :none
12
+ # policy.script_src :self, :https
13
+ # policy.style_src :self, :https
14
+ # # If you are using webpack-dev-server then specify webpack-dev-server host
15
+ # policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
16
+
17
+ # # Specify URI for violation reports
18
+ # # policy.report_uri "/csp-violation-report-endpoint"
19
+ # end
20
+
21
+ # If you are using UJS then enable automatic nonce generation
22
+ # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
23
+
24
+ # Set the nonce only to specific directives
25
+ # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
26
+
27
+ # Report CSP violations to a specified URI
28
+ # For further information see the following documentation:
29
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
30
+ # Rails.application.config.content_security_policy_report_only = true
@@ -1,4 +1,6 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
4
+ Rails.application.config.filter_parameters += [
5
+ :password, :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
6
+ ]
@@ -0,0 +1,67 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains migration options to ease your Rails 6.1 upgrade.
4
+ #
5
+ # Once upgraded flip defaults one by one to migrate to the new default.
6
+ #
7
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8
+
9
+ # Support for inversing belongs_to -> has_many Active Record associations.
10
+ # Rails.application.config.active_record.has_many_inversing = true
11
+
12
+ # Track Active Storage variants in the database.
13
+ # Rails.application.config.active_storage.track_variants = true
14
+
15
+ # Apply random variation to the delay when retrying failed jobs.
16
+ # Rails.application.config.active_job.retry_jitter = 0.15
17
+
18
+ # Stop executing `after_enqueue`/`after_perform` callbacks if
19
+ # `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
20
+ # Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
21
+
22
+ # Specify cookies SameSite protection level: either :none, :lax, or :strict.
23
+ #
24
+ # This change is not backwards compatible with earlier Rails versions.
25
+ # It's best enabled when your entire app is migrated and stable on 6.1.
26
+ # Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
27
+
28
+ # Generate CSRF tokens that are encoded in URL-safe Base64.
29
+ #
30
+ # This change is not backwards compatible with earlier Rails versions.
31
+ # It's best enabled when your entire app is migrated and stable on 6.1.
32
+ # Rails.application.config.action_controller.urlsafe_csrf_tokens = true
33
+
34
+ # Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
35
+ # UTC offset or a UTC time.
36
+ # ActiveSupport.utc_to_local_returns_utc_offset_times = true
37
+
38
+ # Change the default HTTP status code to `308` when redirecting non-GET/HEAD
39
+ # requests to HTTPS in `ActionDispatch::SSL` middleware.
40
+ # Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
41
+
42
+ # Use new connection handling API. For most applications this won't have any
43
+ # effect. For applications using multiple databases, this new API provides
44
+ # support for granular connection swapping.
45
+ # Rails.application.config.active_record.legacy_connection_handling = false
46
+
47
+ # Make `form_with` generate non-remote forms by default.
48
+ # Rails.application.config.action_view.form_with_generates_remote_forms = false
49
+
50
+ # Set the default queue name for the analysis job to the queue adapter default.
51
+ # Rails.application.config.active_storage.queues.analysis = nil
52
+
53
+ # Set the default queue name for the purge job to the queue adapter default.
54
+ # Rails.application.config.active_storage.queues.purge = nil
55
+
56
+ # Set the default queue name for the incineration job to the queue adapter default.
57
+ # Rails.application.config.action_mailbox.queues.incineration = nil
58
+
59
+ # Set the default queue name for the routing job to the queue adapter default.
60
+ # Rails.application.config.action_mailbox.queues.routing = nil
61
+
62
+ # Set the default queue name for the mail deliver job to the queue adapter default.
63
+ # Rails.application.config.action_mailer.deliver_later_queue_name = nil
64
+
65
+ # Generate a `Link` header that gives a hint to modern browsers about
66
+ # preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
67
+ # Rails.application.config.action_view.preload_links_header = true
@@ -0,0 +1,11 @@
1
+ # Define an application-wide HTTP permissions policy. For further
2
+ # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
+ #
4
+ # Rails.application.config.permissions_policy do |f|
5
+ # f.camera :none
6
+ # f.gyroscope :none
7
+ # f.microphone :none
8
+ # f.usb :none
9
+ # f.fullscreen :self
10
+ # f.payment :self, "https://secure.example.com"
11
+ # end
@@ -27,7 +27,7 @@
27
27
  # 'true': 'foo'
28
28
  #
29
29
  # To learn more, please read the Rails Internationalization guide
30
- # available at http://guides.rubyonrails.org/i18n.html.
30
+ # available at https://guides.rubyonrails.org/i18n.html.
31
31
 
32
32
  en:
33
33
  hello: "Hello world"
@@ -4,16 +4,16 @@
4
4
  # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
5
  # and maximum; this matches the default thread size of Active Record.
6
6
  #
7
- threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
7
+ threads_count = ENV.fetch("RAILS_MAX_THREADS", 5)
8
8
  threads threads_count, threads_count
9
9
 
10
10
  # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
11
11
  #
12
- port ENV.fetch("PORT") { 3000 }
12
+ port ENV.fetch("PORT", 3000)
13
13
 
14
14
  # Specifies the `environment` that Puma will run in.
15
15
  #
16
- environment ENV.fetch("RAILS_ENV") { "development" }
16
+ environment ENV.fetch("RAILS_ENV", "development")
17
17
 
18
18
  # Specifies the number of `workers` to boot in clustered mode.
19
19
  # Workers are forked webserver processes. If using threads and workers together
@@ -1,6 +1,6 @@
1
- %w(
1
+ %w[
2
2
  .ruby-version
3
3
  .rbenv-vars
4
4
  tmp/restart.txt
5
5
  tmp/caching-dev.txt
6
- ).each { |path| Spring.watch(path) }
6
+ ].each { |path| Spring.watch(path) }
@@ -0,0 +1,34 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
8
+
9
+ # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10
+ # amazon:
11
+ # service: S3
12
+ # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13
+ # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14
+ # region: us-east-1
15
+ # bucket: your_own_bucket
16
+
17
+ # Remember not to checkin your GCS keyfile to a repository
18
+ # google:
19
+ # service: GCS
20
+ # project: your_project
21
+ # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22
+ # bucket: your_own_bucket
23
+
24
+ # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25
+ # microsoft:
26
+ # service: AzureStorage
27
+ # storage_account_name: your_account_name
28
+ # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29
+ # container: your_container_name
30
+
31
+ # mirror:
32
+ # service: Mirror
33
+ # primary: local
34
+ # mirrors: [ amazon, google, microsoft ]
@@ -11,7 +11,6 @@
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
13
  ActiveRecord::Schema.define(version: 2020_10_05_164116) do
14
-
15
14
  # These are extensions that must be enabled in order to support this database
16
15
  enable_extension "plpgsql"
17
16
  enable_extension "uuid-ossp"
@@ -36,5 +35,4 @@ ActiveRecord::Schema.define(version: 2020_10_05_164116) do
36
35
  t.datetime "updated_at", null: false
37
36
  t.index ["event_type"], name: "index_nulogy_mb_producer_subscriptions_on_event_type"
38
37
  end
39
-
40
38
  end
@@ -2279,3 +2279,320 @@ Migrating to CreateActiveStorageTables (20201005164116)
2279
2279
  ActiveRecord::InternalMetadata Update (1.1ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2020-10-08 19:11:47.218022"], ["key", "environment"]]
2280
2280
   (1.3ms) COMMIT
2281
2281
   (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2282
+  (176.5ms) CREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'
2283
+  (2.4ms) CREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'
2284
+ SQL (2.7ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2285
+ SQL (34.7ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2286
+  (2.2ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
2287
+  (12.0ms) 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)
2288
+  (8.3ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
2289
+  (1.5ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
2290
+  (6.1ms) 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)
2291
+  (3.3ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
2292
+  (5.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2293
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2294
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES (20201005164116)
2295
+  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES
2296
+ (20200611150212),
2297
+ (20201005150212);
2298
+
2299
+ 
2300
+  (5.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2301
+ 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]]
2302
+  (1.0ms) BEGIN
2303
+ ActiveRecord::InternalMetadata Create (2.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", "2021-03-09 17:25:53.335828"], ["updated_at", "2021-03-09 17:25:53.335828"]]
2304
+  (1.6ms) COMMIT
2305
+ ActiveRecord::InternalMetadata Load (2.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2306
+  (1.1ms) BEGIN
2307
+  (1.0ms) COMMIT
2308
+ SQL (2.8ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2309
+ SQL (24.8ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2310
+  (2.0ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
2311
+  (30.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)
2312
+  (5.5ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
2313
+  (1.3ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
2314
+  (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)
2315
+  (5.2ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
2316
+  (6.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2317
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2318
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES (20201005164116)
2319
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES
2320
+ (20200611150212),
2321
+ (20201005150212);
2322
+
2323
+ 
2324
+  (5.9ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2325
+ ActiveRecord::InternalMetadata Load (2.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2326
+  (0.8ms) BEGIN
2327
+ ActiveRecord::InternalMetadata Create (1.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2021-03-09 17:25:53.524890"], ["updated_at", "2021-03-09 17:25:53.524890"]]
2328
+  (1.5ms) COMMIT
2329
+ 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]]
2330
+  (1.0ms) BEGIN
2331
+ 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", "2021-03-09 17:25:53.533488"], ["key", "environment"]]
2332
+  (1.6ms) COMMIT
2333
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2334
+  (1.4ms) SELECT pg_try_advisory_lock(3053653019973222135)
2335
+  (5.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2336
+ Migrating to AddEventTypeToSubscriptionEvents (20210330204121)
2337
+  (2.0ms) BEGIN
2338
+  (8.7ms) ALTER TABLE "message_bus_subscriptions" ADD "event_type" text
2339
+  (2.0ms) ROLLBACK
2340
+  (2.1ms) SELECT pg_advisory_unlock(3053653019973222135)
2341
+  (1.9ms) CREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'
2342
+  (1.8ms) CREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'
2343
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2344
+  (3.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2345
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2346
+  (1.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2347
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2348
+  (1.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2349
+ SQL (3.8ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2350
+ SQL (1.6ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2351
+  (8.9ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
2352
+  (21.9ms) 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)
2353
+  (4.3ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
2354
+  (3.0ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
2355
+  (6.1ms) 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)
2356
+  (3.6ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
2357
+  (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2358
+ 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]]
2359
+  (1.5ms) BEGIN
2360
+  (1.6ms) COMMIT
2361
+ 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]]
2362
+  (1.7ms) BEGIN
2363
+  (1.4ms) COMMIT
2364
+ SQL (4.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2365
+ SQL (2.1ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2366
+  (16.8ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
2367
+  (22.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)
2368
+  (4.5ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
2369
+  (4.2ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
2370
+  (8.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)
2371
+  (4.1ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
2372
+  (3.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2373
+  (5.9ms) INSERT INTO "schema_migrations" (version) VALUES (20201005164116)
2374
+  (3.0ms) INSERT INTO "schema_migrations" (version) VALUES
2375
+ (20200611150212),
2376
+ (20201005150212);
2377
+
2378
+ 
2379
+ ActiveRecord::InternalMetadata Load (3.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2380
+  (2.0ms) BEGIN
2381
+ ActiveRecord::InternalMetadata Create (3.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2021-03-30 20:52:23.588828"], ["updated_at", "2021-03-30 20:52:23.588828"]]
2382
+  (3.0ms) COMMIT
2383
+ ActiveRecord::InternalMetadata Load (2.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2384
+  (1.5ms) BEGIN
2385
+ ActiveRecord::InternalMetadata Update (1.8ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2021-03-30 20:52:23.604948"], ["key", "environment"]]
2386
+  (2.3ms) COMMIT
2387
+  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2388
+  (1.1ms) SELECT pg_try_advisory_lock(3053653019973222135)
2389
+  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2390
+ Migrating to AddEventTypeToSubscriptionEvents (20210330204121)
2391
+  (1.5ms) BEGIN
2392
+  (2.8ms) ALTER TABLE "message_bus_subscriptions" ADD "event_type" text
2393
+  (1.6ms) ROLLBACK
2394
+  (1.6ms) SELECT pg_advisory_unlock(3053653019973222135)
2395
+  (1.5ms) SELECT pg_try_advisory_lock(3053653019973222135)
2396
+  (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2397
+ Migrating to AddEventTypeToSubscriptionEvents (20210330204121)
2398
+  (1.6ms) BEGIN
2399
+  (3.1ms) ALTER TABLE "message_bus_subscriptions" ADD "event_type" text
2400
+  (1.6ms) ROLLBACK
2401
+  (2.4ms) SELECT pg_advisory_unlock(3053653019973222135)
2402
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2403
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2404
+  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2405
+  (1.2ms) SELECT pg_try_advisory_lock(3053653019973222135)
2406
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2407
+ Migrating to CreateActiveStorageTables (20201005164116)
2408
+  (1.2ms) BEGIN
2409
+ ActiveRecord::SchemaMigration Destroy (2.7ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20201005164116"]]
2410
+  (5.3ms) COMMIT
2411
+  (1.4ms) SELECT pg_advisory_unlock(3053653019973222135)
2412
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2413
+  (1.1ms) SELECT pg_try_advisory_lock(3053653019973222135)
2414
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2415
+ Migrating to CreateActiveStorageTables (20201005164116)
2416
+  (1.5ms) BEGIN
2417
+ ActiveRecord::SchemaMigration Create (1.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201005164116"]]
2418
+  (2.7ms) COMMIT
2419
+ Migrating to AddEventTypeToSubscriptionEvents (20210330204121)
2420
+  (1.7ms) BEGIN
2421
+  (3.3ms) ALTER TABLE "message_bus_subscriptions" ADD "event_type" text
2422
+  (1.5ms) ROLLBACK
2423
+  (1.5ms) SELECT pg_advisory_unlock(3053653019973222135)
2424
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2425
+  (1.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2426
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2427
+  (1.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2428
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2429
+  (1.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2430
+  (24.4ms) DROP DATABASE IF EXISTS "nulogy_message_bus_producer_development"
2431
+  (1.8ms) DROP DATABASE IF EXISTS "nulogy_message_bus_producer_test"
2432
+  (248.6ms) CREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'
2433
+  (1.9ms) CREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'
2434
+  (16.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2435
+  (10.8ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2436
+  (1.3ms) SELECT pg_try_advisory_lock(3053653019973222135)
2437
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2438
+ Migrating to CreatePublicSubscriptionsAndEventsTables (20200611150212)
2439
+  (1.5ms) BEGIN
2440
+ SQL (7.7ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2441
+  (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)
2442
+  (3.3ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
2443
+  (5.9ms) CREATE TABLE "message_bus_subscription_events" ("id" uuid NOT NULL PRIMARY KEY, "public_subscription_id" uuid NOT NULL, "partition_key" character varying NOT NULL, "topic_name" character varying NOT NULL, "tenant_id" uuid NOT NULL, "event_json" json NOT NULL, "created_at" timestamp)
2444
+  (3.2ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
2445
+ ActiveRecord::SchemaMigration Create (2.0ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200611150212"]]
2446
+  (2.9ms) COMMIT
2447
+ Migrating to RenameTenantIdAndPublic (20201005150212)
2448
+  (1.2ms) BEGIN
2449
+  (2.3ms) ALTER TABLE "message_bus_subscription_events" RENAME COLUMN "tenant_id" TO "company_uuid"
2450
+  (1.5ms) ALTER TABLE "message_bus_subscription_events" RENAME COLUMN "public_subscription_id" TO "subscription_id"
2451
+ ActiveRecord::SchemaMigration Create (1.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201005150212"]]
2452
+  (1.8ms) COMMIT
2453
+ Migrating to CreateActiveStorageTables (20201005164116)
2454
+  (1.4ms) BEGIN
2455
+ ActiveRecord::SchemaMigration Create (1.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201005164116"]]
2456
+  (1.8ms) COMMIT
2457
+ Migrating to AddEventTypeToSubscriptionEvents (20210330204121)
2458
+  (1.9ms) BEGIN
2459
+  (2.2ms) ALTER TABLE "message_bus_subscriptions" ADD "event_type" text
2460
+  (1.3ms) ROLLBACK
2461
+  (1.6ms) SELECT pg_advisory_unlock(3053653019973222135)
2462
+  (1.4ms) SELECT pg_try_advisory_lock(3053653019973222135)
2463
+  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2464
+ Migrating to AddEventTypeToSubscriptionEvents (20210330204121)
2465
+  (1.7ms) BEGIN
2466
+  (2.3ms) ALTER TABLE "message_bus_subscription_events" ADD "event_type" text
2467
+ ActiveRecord::SchemaMigration Create (2.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20210330204121"]]
2468
+  (2.3ms) COMMIT
2469
+ ActiveRecord::InternalMetadata Load (2.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2470
+  (1.5ms) BEGIN
2471
+ ActiveRecord::InternalMetadata Create (2.8ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2021-03-31 14:32:42.969683"], ["updated_at", "2021-03-31 14:32:42.969683"]]
2472
+  (1.8ms) COMMIT
2473
+  (1.2ms) SELECT pg_advisory_unlock(3053653019973222135)
2474
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2475
+  (4.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2476
+  (4.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2477
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2478
+  (1.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2479
+  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2480
+  (1.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2481
+  (3.0ms) DROP DATABASE IF EXISTS "nulogy_message_bus_producer_test"
2482
+  (2.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2483
+  (1.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2484
+  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2485
+  (1.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2486
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2487
+  (1.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2488
+  (1.9ms) DROP DATABASE IF EXISTS "nulogy_message_bus_producer_test"
2489
+  (5.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2490
+  (4.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2491
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2492
+  (1.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2493
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2494
+  (1.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2495
+  (3.0ms) DROP DATABASE IF EXISTS "nulogy_message_bus_producer_test"
2496
+  (4.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2497
+  (2.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2498
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2499
+  (1.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2500
+  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2501
+  (2.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2502
+  (23.2ms) DROP DATABASE IF EXISTS "nulogy_message_bus_producer_test"
2503
+  (223.2ms) CREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'
2504
+ SQL (1.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2505
+ SQL (7.9ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2506
+  (1.6ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
2507
+  (8.8ms) 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, "event_type" text)
2508
+  (3.8ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
2509
+  (1.4ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
2510
+  (5.9ms) 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)
2511
+  (3.8ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
2512
+  (6.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2513
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2514
+  (1.9ms) INSERT INTO "schema_migrations" (version) VALUES (20210330204121)
2515
+  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES
2516
+ (20201005164116),
2517
+ (20200611150212),
2518
+ (20201005150212);
2519
+
2520
+ 
2521
+  (6.0ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2522
+ ActiveRecord::InternalMetadata Load (2.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2523
+  (1.4ms) BEGIN
2524
+ ActiveRecord::InternalMetadata Create (1.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2021-03-31 17:26:56.186267"], ["updated_at", "2021-03-31 17:26:56.186267"]]
2525
+  (1.8ms) COMMIT
2526
+ 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]]
2527
+  (1.3ms) BEGIN
2528
+ ActiveRecord::InternalMetadata Update (1.5ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2021-03-31 17:26:56.197348"], ["key", "environment"]]
2529
+  (1.7ms) COMMIT
2530
+ NulogyMessageBusProducer::SubscriptionEvent Load (3.6ms) SELECT "message_bus_subscription_events".* FROM "message_bus_subscription_events" WHERE "message_bus_subscription_events"."id" = $1 LIMIT $2 [["id", "052ccd7d-fcb8-4779-a431-edcd07c6f9f2"], ["LIMIT", 1]]
2531
+  (1.5ms) BEGIN
2532
+ NulogyMessageBusProducer::SubscriptionEvent Create (2.1ms) INSERT INTO "message_bus_subscription_events" ("id", "subscription_id", "partition_key", "topic_name", "company_uuid", "event_json", "created_at", "event_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["id", "052ccd7d-fcb8-4779-a431-edcd07c6f9f2"], ["subscription_id", "b7431c4b-6ba1-48de-9089-0d551a0b2289"], ["partition_key", "d42fd0ff-5f7c-4479-a555-275ad4a3d9ba"], ["topic_name", "some-topic"], ["company_uuid", "d42fd0ff-5f7c-4479-a555-275ad4a3d9ba"], ["event_json", "{\"field\":\"value\"}"], ["created_at", "2021-03-31 18:13:57.002078"], ["event_type", "some-type"]]
2533
+  (2.9ms) COMMIT
2534
+ NulogyMessageBusProducer::SubscriptionEvent Load (2.9ms) SELECT "message_bus_subscription_events".* FROM "message_bus_subscription_events" WHERE "message_bus_subscription_events"."id" = $1 LIMIT $2 [["id", "4301a9a9-410d-4906-a308-3f2e2a716481"], ["LIMIT", 1]]
2535
+  (1.9ms) BEGIN
2536
+ NulogyMessageBusProducer::SubscriptionEvent Create (1.9ms) INSERT INTO "message_bus_subscription_events" ("id", "subscription_id", "partition_key", "topic_name", "company_uuid", "event_json", "created_at", "event_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["id", "4301a9a9-410d-4906-a308-3f2e2a716481"], ["subscription_id", "af99e3c4-e8da-4650-8429-a093d57e28c5"], ["partition_key", "43c04d27-3b88-4bb8-aa32-6e9cc401a9a1"], ["topic_name", "some-topic"], ["company_uuid", "43c04d27-3b88-4bb8-aa32-6e9cc401a9a1"], ["event_json", "{\"field\":\"value\"}"], ["created_at", "2021-03-31 18:20:17.588245"], ["event_type", "some-type"]]
2537
+  (2.9ms) COMMIT
2538
+ NulogyMessageBusProducer::SubscriptionEvent Load (2.4ms) SELECT "message_bus_subscription_events".* FROM "message_bus_subscription_events" WHERE "message_bus_subscription_events"."id" = $1 LIMIT $2 [["id", "0de39387-eb7b-4c82-981e-5440bcb563b0"], ["LIMIT", 1]]
2539
+  (1.7ms) BEGIN
2540
+ NulogyMessageBusProducer::SubscriptionEvent Create (2.1ms) INSERT INTO "message_bus_subscription_events" ("id", "subscription_id", "partition_key", "topic_name", "company_uuid", "event_json", "created_at", "event_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["id", "0de39387-eb7b-4c82-981e-5440bcb563b0"], ["subscription_id", "9d1b70b1-7598-4687-a634-d55b17f868cc"], ["partition_key", "c7075533-fd2e-4f63-b964-980f3fa5f4a6"], ["topic_name", "some-topic"], ["company_uuid", "c7075533-fd2e-4f63-b964-980f3fa5f4a6"], ["event_json", "{\"field\":\"value\"}"], ["created_at", "2021-03-31 18:21:19.585687"], ["event_type", "some-type"]]
2541
+  (2.9ms) COMMIT
2542
+ NulogyMessageBusProducer::SubscriptionEvent Load (2.6ms) SELECT "message_bus_subscription_events".* FROM "message_bus_subscription_events" WHERE "message_bus_subscription_events"."id" = $1 LIMIT $2 [["id", "afa71c73-ea8c-4c05-ab56-5518923ef09f"], ["LIMIT", 1]]
2543
+  (1.6ms) BEGIN
2544
+ NulogyMessageBusProducer::SubscriptionEvent Create (2.1ms) INSERT INTO "message_bus_subscription_events" ("id", "subscription_id", "partition_key", "topic_name", "company_uuid", "event_json", "created_at", "event_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["id", "afa71c73-ea8c-4c05-ab56-5518923ef09f"], ["subscription_id", "a91d295d-d570-49fc-bb50-7bc2317e7635"], ["partition_key", "106bea13-ccdb-49a5-a613-9c3e206267ca"], ["topic_name", "some-topic"], ["company_uuid", "106bea13-ccdb-49a5-a613-9c3e206267ca"], ["event_json", "{\"field\":\"value\"}"], ["created_at", "2021-03-31 18:21:20.593447"], ["event_type", "some-type"]]
2545
+  (3.1ms) COMMIT
2546
+ NulogyMessageBusProducer::SubscriptionEvent Load (2.3ms) SELECT "message_bus_subscription_events".* FROM "message_bus_subscription_events" WHERE "message_bus_subscription_events"."id" = $1 LIMIT $2 [["id", "91cc1302-d68e-42e4-8491-d4743289c54a"], ["LIMIT", 1]]
2547
+  (1.7ms) BEGIN
2548
+ NulogyMessageBusProducer::SubscriptionEvent Create (1.9ms) INSERT INTO "message_bus_subscription_events" ("id", "subscription_id", "partition_key", "topic_name", "company_uuid", "event_json", "created_at", "event_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["id", "91cc1302-d68e-42e4-8491-d4743289c54a"], ["subscription_id", "d820eb79-29b4-48cb-91d3-aa6deeb7b182"], ["partition_key", "67afaf53-d2b3-47cd-937b-6d4ef9492b39"], ["topic_name", "some-topic"], ["company_uuid", "67afaf53-d2b3-47cd-937b-6d4ef9492b39"], ["event_json", "{\"field\":\"value\"}"], ["created_at", "2021-03-31 18:21:21.425429"], ["event_type", "some-type"]]
2549
+  (3.0ms) COMMIT
2550
+ NulogyMessageBusProducer::SubscriptionEvent Load (2.2ms) SELECT "message_bus_subscription_events".* FROM "message_bus_subscription_events" WHERE "message_bus_subscription_events"."id" = $1 LIMIT $2 [["id", "31e9b591-c646-4fcc-bcc6-70afe4aaa05c"], ["LIMIT", 1]]
2551
+  (1.3ms) BEGIN
2552
+ NulogyMessageBusProducer::SubscriptionEvent Create (1.3ms) INSERT INTO "message_bus_subscription_events" ("id", "subscription_id", "partition_key", "topic_name", "company_uuid", "event_json", "created_at", "event_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["id", "31e9b591-c646-4fcc-bcc6-70afe4aaa05c"], ["subscription_id", "8e8b156e-b4e5-47a7-9f86-e6e876ccaf51"], ["partition_key", "c035daf9-1d15-4515-bbe2-7170a1ed7402"], ["topic_name", "some-topic"], ["company_uuid", "c035daf9-1d15-4515-bbe2-7170a1ed7402"], ["event_json", "{\"field\":\"value\"}"], ["created_at", "2021-03-31 18:21:22.409136"], ["event_type", "some-type"]]
2553
+  (1.8ms) COMMIT
2554
+  (2.2ms) CREATE DATABASE "nulogy_message_bus_producer_development" ENCODING = 'utf8'
2555
+  (2.0ms) CREATE DATABASE "nulogy_message_bus_producer_test" ENCODING = 'utf8'
2556
+  (4.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2557
+  (2.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2558
+  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2559
+  (1.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2560
+  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2561
+  (1.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2562
+ SQL (3.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2563
+ SQL (1.3ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2564
+  (11.4ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
2565
+  (22.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)
2566
+  (3.1ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
2567
+  (3.3ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
2568
+  (5.1ms) 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)
2569
+  (3.0ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
2570
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2571
+ 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]]
2572
+ ActiveRecord::InternalMetadata Load (1.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2573
+ ActiveRecord::InternalMetadata Load (2.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "schema_sha1"], ["LIMIT", 1]]
2574
+ TRANSACTION (1.6ms) BEGIN
2575
+ 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", "2021-04-20 19:55:36.994839"], ["updated_at", "2021-04-20 19:55:36.994839"]]
2576
+ TRANSACTION (1.8ms) COMMIT
2577
+ SQL (2.6ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2578
+ SQL (1.6ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2579
+  (11.1ms) DROP TABLE IF EXISTS "message_bus_subscription_events" CASCADE
2580
+  (18.9ms) 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)
2581
+  (3.8ms) CREATE INDEX "index_nulogy_mb_producer_subscription_events_on_created_at" ON "message_bus_subscription_events" ("created_at")
2582
+  (3.6ms) DROP TABLE IF EXISTS "message_bus_subscriptions" CASCADE
2583
+  (6.1ms) 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)
2584
+  (3.6ms) CREATE INDEX "index_nulogy_mb_producer_subscriptions_on_event_type" ON "message_bus_subscriptions" ("event_type")
2585
+  (2.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2586
+ ActiveRecord::InternalMetadata Load (2.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2587
+ TRANSACTION (1.2ms) BEGIN
2588
+ ActiveRecord::InternalMetadata Update (1.5ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "development"], ["updated_at", "2021-04-20 19:55:37.116933"], ["key", "environment"]]
2589
+ TRANSACTION (1.7ms) COMMIT
2590
+ 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]]
2591
+ TRANSACTION (1.0ms) BEGIN
2592
+ 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", "2021-04-20 19:55:37.129052"], ["key", "environment"]]
2593
+ TRANSACTION (1.8ms) COMMIT
2594
+ 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]]
2595
+ TRANSACTION (1.2ms) BEGIN
2596
+ ActiveRecord::InternalMetadata Create (1.4ms) 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", "2021-04-20 19:55:37.139478"], ["updated_at", "2021-04-20 19:55:37.139478"]]
2597
+ TRANSACTION (1.6ms) COMMIT
2598
+  (3.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC