{"record":{"id":"ba8ada96cf21c4eb","repo":"nautechsystems/nautilus_trader","slug":"no-durable-store-configured-refusing-to-migrate-e","errorCode":null,"errorMessage":"No durable store configured; refusing to migrate execution transaction","messagePattern":"No durable store configured; refusing to migrate execution transaction","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/cache/mod.rs","lineNumber":202,"sourceCode":"                wallet_address,\n                nonce,\n                transaction_hash,\n                purpose,\n                status,\n                client_order_id,\n            )\n            .await\n    }\n\n    /// Migrates the execution transaction table and installs its signer and order uniqueness\n    /// constraints, failing closed when no database is attached.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if no database is configured or the database operation fails.\n    pub async fn ensure_execution_transaction_schema(&self) -> anyhow::Result<()> {\n        let database = self.database.as_ref().ok_or_else(|| {\n            anyhow::anyhow!(\n                \"No durable store configured; refusing to migrate execution transaction\"\n            )\n        })?;\n\n        database.ensure_execution_transaction_schema().await\n    }\n\n    /// Updates the status of a persisted execution transaction record, failing closed when no\n    /// database is attached.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if no database is configured or the database operation fails.\n    pub async fn update_execution_transaction_status(\n        &self,\n        chain_id: u32,\n        transaction_hash: &str,\n        status: &str,","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/cache/mod.rs#L184-L220","documentation":"ensure_execution_transaction_schema runs the schema migration for execution transactions but requires a configured durable database. With no database configured on the cache, it refuses to migrate rather than performing a no-op, so callers do not assume a schema exists when nothing was provisioned.","triggerScenarios":"Calling ensure_execution_transaction_schema() on a BlockchainCache whose database field is None — typically during startup initialization on a cache built without a database handle.","commonSituations":"Startup bootstrap code unconditionally calling migrations while the cache was constructed without a database; config missing the database connection; environment-specific deployments (local dev) disabling the durable store but keeping the same init path.","solutions":["Provide the database to the BlockchainCache constructor before invoking schema migration","Skip the migration call when no database is configured (guard the init path)","Fix the config so the database URL is present in the environment that runs migrations","Ensure migrations run against the same database instance the cache will use"],"exampleFix":"// before\ncache.ensure_execution_transaction_schema().await?; // database is None\n// after\nif let Some(db) = &cache.database {\n    db.ensure_execution_transaction_schema().await?;\n}","handlingStrategy":"validation","validationCode":"if cache.database.is_none() {\n    eprintln!(\"skipping execution transaction migration: no durable store\");\n}","typeGuard":"fn can_migrate(cache: &BlockchainCache) -> bool {\n    cache.database.is_some()\n}","tryCatchPattern":"match cache.ensure_execution_transaction_schema().await {\n    Err(e) if e.to_string().contains(\"No durable store configured\") => {\n        // fail startup fast with a clear config message\n    }\n    other => other?,\n}","preventionTips":["Run migrations only on caches constructed with a database","Validate database config at process start","Separate migration bootstrap from optional in-memory setups","Document that schema migration requires a configured store"],"tags":["database","migration","configuration","startup"],"backgroundTag":"missing-required-config","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}