{"record":{"id":"1efafdca102a7f31","repo":"remix-run/remix","slug":"unknown-column-key-in-option-optionname-fo","errorCode":null,"errorMessage":"Unknown column \"{key}\" in option \"{optionName}\" for table \"{getTableName(table)}\"","messagePattern":"Unknown column \"(.+?)\" in option \"(.+?)\" for table \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/data-table/src/lib/table.ts","lineNumber":1147,"sourceCode":"  defaultValue: readonly string[],\n): string[] {\n  if (selector === undefined) {\n    return [...defaultValue]\n  }\n\n  let keys = Array.isArray(selector) ? [...selector] : [selector]\n\n  if (keys.length === 0) {\n    throw new Error(\n      'Option \"' + optionName + '\" for table \"' + getTableName(table) + '\" must not be empty',\n    )\n  }\n\n  let columns = getTableColumns(table)\n\n  for (let key of keys) {\n    if (!Object.prototype.hasOwnProperty.call(columns, key)) {\n      throw new Error(\n        'Unknown column \"' +\n          key +\n          '\" in option \"' +\n          optionName +\n          '\" for table \"' +\n          getTableName(table) +\n          '\"',\n      )\n    }\n  }\n\n  return keys\n}\n\nfunction normalizeTimestampConfig(options: TimestampOptions | undefined): TimestampConfig | null {\n  if (!options) {\n    return null\n  }","sourceCodeStart":1129,"sourceCodeEnd":1165,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/data-table/src/lib/table.ts#L1129-L1165","documentation":"Column-selector options (unique, indexes, etc.) only accept names of columns that exist on the table. This error is thrown when a selector references a column key not present in the columns definition.","triggerScenarios":"unique: ['email'] on a table where the column is defined as emailAddress; also selectors computed at runtime referencing removed columns.","commonSituations":"Renaming columns without updating constraint options, snake_case/camelCase drift, or copy-pasting options between tables.","solutions":["Use the exact column key from the table's columns definition","Update the option after renaming a column","Type the selector against the table's row keys to catch drift at compile time"],"exampleFix":"// before\ncreateTable('users', cols, { unique: ['emailAddress'] })\n// after\ncreateTable('users', cols, { unique: ['email'] })","handlingStrategy":"validation","validationCode":"for (const key of keys) {\n  if (!(key in tableColumns)) throw new Error(`unknown column ${key}`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Type selectors as (keyof ColumnsDefinition)[] to catch drift at compile time","Update constraint options in the same commit as column renames"],"tags":["data-table","schema","options"],"backgroundTag":"schema-validation-failed","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}