{"record":{"id":"243a2374907ab808","repo":"clockworklabs/SpacetimeDB","slug":"system-table-schema-mismatch-for-table-id-table-i","errorCode":null,"errorMessage":"System table schema mismatch for table id {table_id}. Expected: {schema:?}, found: {in_memory:?}","messagePattern":"System table schema mismatch for table id (.+?)\\. Expected: (.+?), found: (.+?)","errorType":"exception","errorClass":"DBError","httpStatus":null,"severity":"error","filePath":"crates/datastore/src/locking_tx_datastore/committed_state.rs","lineNumber":413,"sourceCode":"        for schema in system_tables() {\n            let table_id = schema.table_id;\n            let in_memory = self\n                .tables\n                .get(&table_id)\n                .ok_or(TableError::IdNotFoundState(table_id))?\n                .schema\n                .clone();\n            let mut in_st_tables = self.schema_for_table_raw(table_id)?;\n            // We normalize so that the orders will match when checking for equality.\n            in_st_tables.normalize();\n            let in_memory = {\n                let mut s = in_memory.as_ref().clone();\n                s.normalize();\n                s\n            };\n\n            if in_memory != in_st_tables {\n                return Err(anyhow!(\n                    \"System table schema mismatch for table id {table_id}. Expected: {schema:?}, found: {in_memory:?}\"\n                )\n                .into());\n            }\n        }\n\n        Ok(())\n    }\n\n    /// Builds the in-memory state of sequences from `st_sequence` system table.\n    /// The tables store the lasted allocated value, which tells us where to start generating.\n    pub(super) fn build_sequence_state(&mut self) -> Result<SequencesState> {\n        let mut sequence_state = SequencesState::default();\n        let st_sequences = self.tables.get(&ST_SEQUENCE_ID).unwrap();\n        for row_ref in st_sequences.scan_rows(&self.blob_store) {\n            let sequence = StSequenceRow::try_from(row_ref)?;\n            let seq = Sequence::new(sequence.clone().into(), Some(sequence.allocated));\n","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/datastore/src/locking_tx_datastore/committed_state.rs#L395-L431","documentation":"Error \"System table schema mismatch for table id {table_id}. Expected: {schema:?}, found: {in_memory:?}\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/datastore/src/locking_tx_datastore/committed_state.rs:413 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}