version: "2"
sql:
  # SQLite configuration for development
  - name: "sqlite"
    engine: "sqlite"
    queries: ["db/queries/", "db/sqlite/setup.sql"]
    schema: "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: ["db/queries/", "db/postgresql/setup.sql"]
    schema: "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