-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
178 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
EMS/core-bundle/src/Resources/DoctrineMigrations/pdo_mysql/Version20240409120638.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Platforms\MySQLPlatform; | ||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20240409120638 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Form submission change expire_date from date to datetime'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQLPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE form_submission CHANGE expire_date expire_date DATETIME DEFAULT NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQLPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE form_submission CHANGE expire_date expire_date DATE DEFAULT NULL'); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
EMS/core-bundle/src/Resources/DoctrineMigrations/pdo_pgsql/Version20240409120406.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform; | ||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20240409120406 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Form submission change expire_date from date to datetime'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\PostgreSQLPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE form_submission ALTER expire_date TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\PostgreSQLPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE form_submission ALTER expire_date TYPE DATE'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
elasticms-web/migrations/pdo_mysql/Version20240409121627.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Platforms\MySQLPlatform; | ||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20240409121627 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Form submission change expire_date from date to datetime'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQLPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE form_submission CHANGE expire_date expire_date DATETIME DEFAULT NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQLPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE form_submission CHANGE expire_date expire_date DATE DEFAULT NULL'); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
elasticms-web/migrations/pdo_pgsql/Version20240409121450.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform; | ||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20240409121450 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Form submission change expire_date from date to datetime'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\PostgreSQLPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE form_submission ALTER expire_date TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->abortIf( | ||
!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, | ||
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\PostgreSQLPlatform'." | ||
); | ||
|
||
$this->addSql('ALTER TABLE form_submission ALTER expire_date TYPE DATE'); | ||
} | ||
} |