You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -42,11 +44,11 @@ public function up(Schema $schema): void
42
44
43
45
publicfunctiondown(Schema$schema): void
44
46
{
45
-
if ('mysql' === $this->connection->getDatabasePlatform()->getName()) {
47
+
if ($this->connection->getDatabasePlatform()instanceof MySQLPlatform) {
46
48
$this->addSql('ALTER TABLE node_type_fields DROP serialization_exclusion_expression, DROP serialization_groups, DROP serialization_max_depth, DROP excluded_from_serialization');
47
49
$this->addSql('DROP INDEX nt_searchable ON node_types');
48
50
$this->addSql('ALTER TABLE node_types DROP searchable');
Copy file name to clipboardExpand all lines: migrations/Version20210701151713.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
5
5
namespaceRZ\Roadiz\Migrations;
6
6
7
+
useDoctrine\DBAL\Platforms\PostgreSQLPlatform;
7
8
useDoctrine\DBAL\Schema\Schema;
8
9
useDoctrine\Migrations\AbstractMigration;
9
10
@@ -16,7 +17,7 @@ public function getDescription(): string
16
17
17
18
publicfunctionup(Schema$schema): void
18
19
{
19
-
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
20
+
if ($this->connection->getDatabasePlatform()instanceof PostgreSQLPlatform) {
20
21
$this->addSql('CREATE TABLE webhooks (id VARCHAR(36) NOT NULL, message_type VARCHAR(255) DEFAULT NULL, uri TEXT DEFAULT NULL, payload JSON DEFAULT NULL, throttleSeconds INT NOT NULL, last_triggered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, automatic BOOLEAN DEFAULT \'false\' NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
21
22
$this->addSql('CREATE INDEX webhook_message_type ON webhooks (message_type)');
22
23
$this->addSql('CREATE INDEX webhook_created_at ON webhooks (created_at)');
0 commit comments