From d24f8b807cb55b40357787dcb529b0ac66041b17 Mon Sep 17 00:00:00 2001 From: Robin Lehrmann Date: Sat, 1 Jan 2022 17:11:43 +0100 Subject: [PATCH] Update projection.md Added missing name column in projection example --- docs/projection.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/projection.md b/docs/projection.md index 024f1bc3f..c412aa0cb 100644 --- a/docs/projection.md +++ b/docs/projection.md @@ -34,7 +34,7 @@ final class ProfileProjection implements Projection public function create(): void { - $this->connection->executeStatement('CREATE TABLE IF NOT EXISTS projection_profile (id VARCHAR PRIMARY KEY);'); + $this->connection->executeStatement('CREATE TABLE IF NOT EXISTS projection_profile (id VARCHAR PRIMARY KEY, name VARCHAR NOT NULL);'); } public function drop(): void @@ -45,7 +45,7 @@ final class ProfileProjection implements Projection public function handleProfileCreated(ProfileCreated $profileCreated): void { $this->connection->executeStatement( - 'INSERT INTO projection_profile (`id`) VALUES(:id);', + 'INSERT INTO projection_profile (`id`, `name`) VALUES(:id, :name);', [ 'id' => $profileCreated->profileId(), 'name' => $profileCreated->name()