Skip to content

Commit fab4aa2

Browse files
Added support for Oracle
1 parent 8d353f0 commit fab4aa2

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.1.0
2+
=======
3+
4+
* (feature) Added support for Oracle.
5+
16
1.0.0
27
=======
38

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
],
1212
"require": {
1313
"php": ">=8.0",
14+
"becklyn/ddd-doctrine-bridge": "^2.2.1",
1415
"becklyn/ddd-symfony-bridge": "^2.0",
1516
"doctrine/doctrine-bundle": "^2.4",
1617
"symfony/config": "^6.0",

src/Infrastructure/DoctrineMigrations/Version20220408113020.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Becklyn\Ddd\PersonalData\Infrastructure\DoctrineMigrations;
66

7+
use Doctrine\DBAL\Platforms\OraclePlatform;
78
use Doctrine\DBAL\Schema\Schema;
89
use Doctrine\Migrations\AbstractMigration;
910

@@ -21,7 +22,11 @@ public function getDescription() : string
2122

2223
public function up(Schema $schema) : void
2324
{
24-
$this->addSql('CREATE TABLE personal_data_store (id VARCHAR(36) NOT NULL, aggregate_id VARCHAR(36) NOT NULL, personal_value VARCHAR(255) DEFAULT NULL, days_to_live INT NOT NULL, event_raised_ts DATETIME(6) NOT NULL, expires_ts DATETIME(6) NOT NULL, anonymized_ts DATETIME(6) DEFAULT NULL, created_ts DATETIME(6) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
25+
if ($this->platform instanceof OraclePlatform) {
26+
$this->addSql('CREATE TABLE personal_data_store (id VARCHAR2(36) NOT NULL, aggregate_id VARCHAR2(36) NOT NULL, personal_value VARCHAR2(255) DEFAULT NULL NULL, days_to_live NUMBER(10) NOT NULL, event_raised_ts TIMESTAMP(6) NOT NULL, expires_ts TIMESTAMP(6) NOT NULL, anonymized_ts TIMESTAMP(6) DEFAULT NULL NULL, created_ts TIMESTAMP(6) NOT NULL, PRIMARY KEY(id))');
27+
} else {
28+
$this->addSql('CREATE TABLE personal_data_store (id VARCHAR(36) NOT NULL, aggregate_id VARCHAR(36) NOT NULL, personal_value VARCHAR(255) DEFAULT NULL, days_to_live INT NOT NULL, event_raised_ts DATETIME(6) NOT NULL, expires_ts DATETIME(6) NOT NULL, anonymized_ts DATETIME(6) DEFAULT NULL, created_ts DATETIME(6) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
29+
}
2530
}
2631

2732
public function down(Schema $schema) : void

0 commit comments

Comments
 (0)