Database Structure Cleanup: - Move all SQL files from ./db/ to ./internal/db/ - Update sqlc.yaml to use new paths (preserving schema+setup.sql hack) - Consolidate database-related code in single directory - Remove empty ./db/ directory Injector Migration: - Move injector.go from content package to engine package - Update ContentClient interface to return map instead of slice for GetBulkContent - Update database client implementation to match interface - Remove injector dependency from enhancer (stub implementation) Demo-Site Consolidation: - Move demo-site to test-sites/demo-site for better organization - Update build scripts to use new demo-site location - Maintain all functionality while improving project structure This continues the unified architecture consolidation by moving core content processing logic to the engine and organizing related files properly.
31 lines
1018 B
YAML
31 lines
1018 B
YAML
version: "2"
|
|
sql:
|
|
# SQLite configuration for development
|
|
- name: "sqlite"
|
|
engine: "sqlite"
|
|
queries: ["internal/db/queries/", "internal/db/sqlite/setup.sql"]
|
|
schema: "internal/db/sqlite/schema.sql"
|
|
gen:
|
|
go:
|
|
package: "sqlite"
|
|
out: "internal/db/sqlite"
|
|
emit_json_tags: true
|
|
emit_prepared_queries: false
|
|
emit_interface: true
|
|
emit_exact_table_names: false
|
|
emit_pointers_for_null_types: false # All fields are NOT NULL now
|
|
|
|
# PostgreSQL configuration for production
|
|
- name: "postgresql"
|
|
engine: "postgresql"
|
|
queries: ["internal/db/queries/", "internal/db/postgresql/setup.sql"]
|
|
schema: "internal/db/postgresql/schema.sql"
|
|
gen:
|
|
go:
|
|
package: "postgresql"
|
|
out: "internal/db/postgresql"
|
|
emit_json_tags: true
|
|
emit_prepared_queries: false
|
|
emit_interface: true
|
|
emit_exact_table_names: false
|
|
emit_pointers_for_null_types: false # All fields are NOT NULL now |