Skip to content

course.search_vector: entity column name doesn't match migration or app SQL #1197

Description

@RUKAYAT-CODER

Three places disagree on the full-text search column on course:

  • Migration 1783000000003-add-course-full-text-search.ts creates search_vector (snake_case)
  • Entity Course.searchVector declares the column as searchVector (camelCase, no explicit name) with generatedType: 'STORED'
  • App raw SQL (src/search/search.service.ts) queries course.search_vector (snake_case)

The entity column maps to a DB column named searchVector, which does not exist — the entity can never read the generated column, and the schema drift check wants to drop search_vector and create searchVector.

Fix: declare the entity column with name: 'search_vector' (keeping the property name searchVector), and align the asExpression with the migration's expression. This also removes a chunk of the known drift snapshot in #1194.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions