Skip to content

Conversation

jrasm91
Copy link
Member

@jrasm91 jrasm91 commented Jul 7, 2025

Enable synchronization for triggers, functions, and indexes with expressions via overrides (keep track of the SQL create statements in a metadata table - migration_overrides).

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those context refactorings could've also been a dedicated PR :P

Comment on lines 6 to 11
const result = await sql
.raw<{
name: string;
value: string;
}>(`SELECT name, value FROM "${ctx.overrideTableName}"`)
.execute(db);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need a raw query here. Dynamic tables released in 0.28.2 https://github.com/kysely-org/kysely/releases/tag/0.28.2 should be exactly for this use case I believe.

@jrasm91 jrasm91 force-pushed the feat/sql-tools-overrides branch from 542ae74 to ad420d8 Compare July 7, 2025 21:59
@jrasm91 jrasm91 force-pushed the feat/sql-tools-overrides branch from ad420d8 to 9f867e2 Compare July 7, 2025 22:05
@jrasm91 jrasm91 merged commit df4a27e into main Jul 8, 2025
51 checks passed
@jrasm91 jrasm91 deleted the feat/sql-tools-overrides branch July 8, 2025 12:17
ollioddi pushed a commit to ollioddi/immich that referenced this pull request Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants