1234567891011121314151617181920212223 |
- <?php
- namespace App\Migrations;
- use Doctrine\DBAL\Migrations\AbstractMigration;
- use Doctrine\DBAL\Schema\Schema;
- abstract class MigrationBase extends AbstractMigration {
- protected function ensureMySQL(): void {
- // this up() migration is auto-generated, please modify it to your needs
- $this->abortIf($this->connection->getDatabasePlatform()
- ->getName() !== 'mysql',
- 'Migration can only be executed safely on \'mysql\'.');
- }
- public function down(Schema $schema) {
- $this->ensureMySQL();
- }
- public function up(Schema $schema) {
- $this->ensureMySQL();
- }
- }
|