Skip to content

Commit

Permalink
SignUp working
Browse files Browse the repository at this point in the history
  • Loading branch information
galeaspablo committed Sep 17, 2024
1 parent f9dc205 commit ff47799
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions application/monolith/code/src/Console/DBMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function execute(
aggregate_version BIGINT NOT NULL,
causation_id VARCHAR(56) NOT NULL,
correlation_id VARCHAR(56) NOT NULL,
event_occurred_on TIMESTAMP(30) NOT NULL,
recorded_on VARCHAR(30) NOT NULL,
event_name VARCHAR(255) NOT NULL,
json_payload TEXT NOT NULL,
json_metadata TEXT NOT NULL,
Expand All @@ -62,7 +62,7 @@ protected function execute(
$this->executeIndexStatementAndIgnoreExceptions("CREATE UNIQUE INDEX idx_event_aggregate_id_version ON event(aggregate_id, aggregate_version);");
$this->executeIndexStatementAndIgnoreExceptions("CREATE INDEX idx_event_causation_id ON event(causation_id);");
$this->executeIndexStatementAndIgnoreExceptions("CREATE INDEX idx_event_correlation_id ON event(correlation_id);");
$this->executeIndexStatementAndIgnoreExceptions("CREATE INDEX idx_event_occurred_on ON event(event_occurred_on);");
$this->executeIndexStatementAndIgnoreExceptions("CREATE INDEX idx_occurred_on ON event(recorded_on);");
$this->executeIndexStatementAndIgnoreExceptions("CREATE INDEX idx_event_name ON event(event_name);");
$this->projectionDocumentManager->getSchemaManager()->createCollections();
$this->projectionDocumentManager->getSchemaManager()->createSearchIndexes();
Expand Down
19 changes: 10 additions & 9 deletions application/monolith/code/src/Service/EventStore/SQLEventStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Galeas\Api\Service\EventStore;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\ParameterType;
use Galeas\Api\Common\Aggregate\Aggregate;
use Galeas\Api\Common\Event\AggregateFromEvents;
use Galeas\Api\Common\Event\Event;
Expand Down Expand Up @@ -169,15 +170,15 @@ public function save(Event $event): void
'json_metadata' => $serializedEvent->jsonMetadata(),
],
[
'event_id' => \PDO::PARAM_STR,
'aggregate_id' => \PDO::PARAM_STR,
'aggregate_version' => \PDO::PARAM_INT,
'causation_id' => \PDO::PARAM_STR,
'correlation_id' => \PDO::PARAM_STR,
'recorded_on' => \PDO::PARAM_STR,
'event_name' => \PDO::PARAM_STR,
'json_payload' => \PDO::PARAM_LOB,
'json_metadata' => \PDO::PARAM_LOB,
'event_id' => ParameterType::STRING,
'aggregate_id' => ParameterType::STRING,
'aggregate_version' => ParameterType::INTEGER,
'causation_id' => ParameterType::STRING,
'correlation_id' => ParameterType::STRING,
'recorded_on' => ParameterType::STRING,
'event_name' => ParameterType::STRING,
'json_payload' => ParameterType::STRING,
'json_metadata' => ParameterType::STRING,
]
);
} catch (\Throwable $exception) {
Expand Down

0 comments on commit ff47799

Please sign in to comment.