-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathmigration.tpl
54 lines (46 loc) · 1.3 KB
/
migration.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
declare(strict_types=1);
// phpcs:ignoreFile
namespace <namespace>;
use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class <className> extends AbstractMigration
{
/**
* @noinspection PhpMissingParentCallCommonInspection
*/
public function getDescription(): string
{
return 'TODO: Describe reason for this migration';
}
/**
* {@inheritdoc}
*/
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof AbstractMySQLPlatform,
'Migration can only be executed safely on \'mysql\'.'
);
<up>
}
/**
* @noinspection PhpMissingParentCallCommonInspection
*
* {@inheritdoc}
*/
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof AbstractMySQLPlatform,
'Migration can only be executed safely on \'mysql\'.'
);
<down>
}
}