Skip to content

Commit

Permalink
Merge pull request #157 from robinlehrmann/patch-1
Browse files Browse the repository at this point in the history
Update projection.md
  • Loading branch information
DavidBadura authored Jan 1, 2022
2 parents b8fb017 + d24f8b8 commit e5dd834
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/projection.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit e5dd834

Please sign in to comment.