**Discovery**: sqlc's DDL support is database-engine specific: ✅ **PostgreSQL**: sqlc generates functions for CREATE INDEX, CREATE FUNCTION ❌ **SQLite**: sqlc does NOT generate CREATE INDEX functions ❌ **Both**: sqlc does NOT generate CREATE TRIGGER functions **Corrected Implementation**: - Use sqlc-generated setup functions where available (tables always, PostgreSQL indexes) - Use manual SQL where sqlc doesn't support (SQLite indexes, all triggers) - Comments clarify why manual SQL is needed in each case **Architecture Principle**: Use sqlc for what it supports, supplement with manual SQL for what it doesn't - this is the recommended hybrid approach.
5.3 KiB
5.3 KiB