From bb399984697e6ab35331b0f1bc7b9a48d532ac35 Mon Sep 17 00:00:00 2001 From: David Badura Date: Wed, 3 May 2023 12:52:44 +0200 Subject: [PATCH] fix missing default values for not nullable fields --- src/Store/MultiTableStore.php | 6 ++++-- src/Store/SingleTableStore.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Store/MultiTableStore.php b/src/Store/MultiTableStore.php index 63a998399..105956f6f 100644 --- a/src/Store/MultiTableStore.php +++ b/src/Store/MultiTableStore.php @@ -306,9 +306,11 @@ private function addAggregateTableToSchema(Schema $schema, string $tableName): v $table->addColumn('recorded_on', Types::DATETIMETZ_IMMUTABLE) ->setNotnull(false); $table->addColumn('new_stream_start', Types::BOOLEAN) - ->setNotnull(true); + ->setNotnull(true) + ->setDefault(false); $table->addColumn('archived', Types::BOOLEAN) - ->setNotnull(true); + ->setNotnull(true) + ->setDefault(false); $table->addColumn('custom_headers', Types::JSON) ->setNotnull(true); diff --git a/src/Store/SingleTableStore.php b/src/Store/SingleTableStore.php index ffb2d0a38..a9b8f46e8 100644 --- a/src/Store/SingleTableStore.php +++ b/src/Store/SingleTableStore.php @@ -249,9 +249,11 @@ public function configureSchema(Schema $schema, Connection $connection): void $table->addColumn('recorded_on', Types::DATETIMETZ_IMMUTABLE) ->setNotnull(false); $table->addColumn('new_stream_start', Types::BOOLEAN) - ->setNotnull(true); + ->setNotnull(true) + ->setDefault(false); $table->addColumn('archived', Types::BOOLEAN) - ->setNotnull(true); + ->setNotnull(true) + ->setDefault(false); $table->addColumn('custom_headers', Types::JSON) ->setNotnull(true);