Skip to content

Commit

Permalink
Merge pull request #375 from patchlevel/fix-missing-default-values-fo…
Browse files Browse the repository at this point in the history
…r-not-nullable-fields

fix missing default values for not nullable fields
  • Loading branch information
DavidBadura authored May 3, 2023
2 parents 1d33e0d + bb39998 commit d4def92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/Store/MultiTableStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 4 additions & 2 deletions src/Store/SingleTableStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d4def92

Please sign in to comment.