From 01b19e955c5bf85b4c823d958d016ee982c467c6 Mon Sep 17 00:00:00 2001 From: Andrew Farries Date: Wed, 27 Nov 2024 07:54:33 +0000 Subject: [PATCH] Change JSON schema for `Column.Nullable` field Set a default value so that the generated type is `bool` rather than `*bool`. --- pkg/migrations/types.go | 2 +- schema.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/migrations/types.go b/pkg/migrations/types.go index 3666ee3a1..c75d9aaa9 100644 --- a/pkg/migrations/types.go +++ b/pkg/migrations/types.go @@ -29,7 +29,7 @@ type Column struct { Name string `json:"name"` // Indicates if the column is nullable - Nullable *bool `json:"nullable,omitempty"` + Nullable bool `json:"nullable,omitempty"` // Indicates if the column is part of the primary key Pk bool `json:"pk,omitempty"` diff --git a/schema.json b/schema.json index a9a60f69d..349e8e2b4 100644 --- a/schema.json +++ b/schema.json @@ -39,7 +39,8 @@ }, "nullable": { "description": "Indicates if the column is nullable", - "type": "boolean" + "type": "boolean", + "default": false }, "pk": { "description": "Indicates if the column is part of the primary key",