diff --git a/db/schema_sqlite.rb b/db/schema_sqlite.rb index d3533e53d..fe2aad115 100644 --- a/db/schema_sqlite.rb +++ b/db/schema_sqlite.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.2].define(version: 2025_11_21_112416) do +ActiveRecord::Schema[8.2].define(version: 2025_11_25_130010) do create_table "accesses", id: :uuid, force: :cascade do |t| t.datetime "accessed_at" t.uuid "account_id", null: false @@ -300,6 +300,7 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_21_112416) do create_table "identities", id: :uuid, force: :cascade do |t| t.datetime "created_at", null: false t.string "email_address", limit: 255, null: false + t.boolean "staff", default: false, null: false t.datetime "updated_at", null: false t.index ["email_address"], name: "index_identities_on_email_address", unique: true end @@ -378,7 +379,7 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_21_112416) do t.text "endpoint", limit: 65535 t.string "p256dh_key", limit: 255 t.datetime "updated_at", null: false - t.string "user_agent", limit: 255 + t.string "user_agent", limit: 4096 t.uuid "user_id", null: false t.index ["account_id"], name: "index_push_subscriptions_on_account_id" t.index ["user_id", "endpoint"], name: "index_push_subscriptions_on_user_id_and_endpoint", unique: true @@ -426,7 +427,7 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_21_112416) do t.uuid "identity_id", null: false t.string "ip_address", limit: 255 t.datetime "updated_at", null: false - t.string "user_agent", limit: 255 + t.string "user_agent", limit: 4096 t.index ["identity_id"], name: "index_sessions_on_identity_id" end diff --git a/gems/fizzy-saas/lib/fizzy/saas/engine.rb b/gems/fizzy-saas/lib/fizzy/saas/engine.rb index 8db0f40bf..14ce03759 100644 --- a/gems/fizzy-saas/lib/fizzy/saas/engine.rb +++ b/gems/fizzy-saas/lib/fizzy/saas/engine.rb @@ -8,10 +8,12 @@ module Fizzy Queenbee.host_app = Fizzy initializer "fizzy_saas.transaction_pinning" do |app| - app.config.middleware.insert_after( - ActiveRecord::Middleware::DatabaseSelector, - TransactionPinning::Middleware - ) + if ActiveRecord::Base.replica_configured? + app.config.middleware.insert_after( + ActiveRecord::Middleware::DatabaseSelector, + TransactionPinning::Middleware + ) + end end config.to_prepare do