{"record":{"id":"aef87ae0cbe67891","repo":"hasura/graphql-engine","slug":"column-column-name-has-type-column-type-in-col","errorCode":null,"errorMessage":"column {column_name} has type {column_type} in collection {collection_name} in data connector {db_name}, not type {field_type}","messagePattern":"column (.+?) has type (.+?) in collection (.+?) in data connector (.+?), not type (.+?)","errorType":"validation","errorClass":"NDCValidationError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/helpers/ndc_validation.rs","lineNumber":75,"sourceCode":"        procedure_name: ProcedureName,\n    },\n    #[error(\"function {function_name} is not defined in data connector {db_name}\")]\n    NoSuchFunction {\n        db_name: Qualified<DataConnectorName>,\n        command_name: Qualified<CommandName>,\n        function_name: FunctionName,\n    },\n    #[error(\n        \"column {column_name} is not defined in function/procedure {func_proc_name} in data connector {db_name}\"\n    )]\n    NoSuchColumnForCommand {\n        db_name: Qualified<DataConnectorName>,\n        command_name: Qualified<CommandName>,\n        field_name: FieldName,\n        func_proc_name: String,\n        column_name: DataConnectorColumnName,\n    },\n    #[error(\n        \"column {column_name} has type {column_type} in collection {collection_name} in data connector {db_name}, not type {field_type}\"\n    )]\n    ColumnTypeDoesNotMatch {\n        db_name: DataConnectorName,\n        model_name: ModelName,\n        field_name: FieldName,\n        collection_name: CollectionName,\n        column_name: DataConnectorColumnName,\n        field_type: String,\n        column_type: String,\n    },\n    #[error(\n        \"internal error: data connector does not define the scalar type {type}, used by field {field_name} in model {model_name}\"\n    )]\n    TypeCapabilityNotDefined {\n        model_name: ModelName,\n        field_name: FieldName,\n        r#type: String,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/helpers/ndc_validation.rs#L57-L93","documentation":"A model's field mapping expects a specific NDC type, but the collection in the data connector reports a different type for that column. Type consistency between model field mappings and connector collections is enforced during resolution.","triggerScenarios":"Model maps a field to a collection column whose type differs (e.g. mapping a Float model field to an Int connector column); the database column type was altered (int -> bigint, varchar -> text) after the model was defined.","commonSituations":"Database schema migration changed a column type; connector version upgrade mapping types differently; mismatched scalar type representations between metadata and connector.","solutions":["Update the model's field mapping so the field type matches the collection column type reported by the connector","Alter the database column back or add a cast so the connector reports the expected type","If the connector's type mapping changed between versions, update the metadata's scalar representations accordingly"],"exampleFix":"# before\nfields:\n  age: { column: age, type: float }  # collection reports Int\n# after\nfields:\n  age: { column: age, type: int }","handlingStrategy":"validation","validationCode":"let ndc_ty = collection.columns.get(col).unwrap();\nif ndc_ty != &expected_field_type { /* fail fast with clear message */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run metadata resolve in CI right after DB migrations to catch type drift"],"tags":["ndc","model","type-mismatch","column-type"],"backgroundTag":"ndc-column-type-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}