From b80f3aa5eada9a2dc71939dbb892f97579a0e5d8 Mon Sep 17 00:00:00 2001 From: Don Browne Date: Thu, 11 Jul 2024 12:34:29 +0100 Subject: [PATCH] Use Version 2 config for sqlc.yaml (#3861) This makes it easier to reuse examples from the documentation. --- sqlc.yaml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sqlc.yaml b/sqlc.yaml index c321d883c7..b06c009266 100644 --- a/sqlc.yaml +++ b/sqlc.yaml @@ -13,19 +13,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -version: "1" -packages: - - name: "db" - path: "./internal/db/" +version: "2" +sql: + - schema: "./database/migrations/" queries: "./database/query/" - schema: "./database/migrations/" engine: "postgresql" - emit_json_tags: true - emit_prepared_queries: false - emit_interface: true - emit_exact_table_names: false - emit_empty_slices: true - overrides: - - db_type: profile_selector - go_type: - type: "ProfileSelector" + gen: + go: + out: "./internal/db/" + package: "db" + emit_json_tags: true + emit_prepared_queries: false + emit_interface: true + emit_exact_table_names: false + emit_empty_slices: true + overrides: + - db_type: profile_selector + go_type: + type: "ProfileSelector"