File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ doctrine_migrations:
44# 'TatevikGr\RssBundle\RssFeedBundle\Migrations': '%kernel.project_dir%/vendor/tatevikgr/rss-bundle/src/RssFeedBundle/Migrations'
55 all_or_nothing : true
66 organize_migrations : false
7+ custom_template : ' %kernel.project_dir%/src/Migrations/_template_migration.php'
78 storage :
89 table_storage :
910 table_name : ' doctrine_migration_versions'
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace <namespace >;
6+
7+ use Doctrine \DBAL \Platforms \PostgreSQLPlatform ;
8+ use Doctrine \DBAL \Platforms \MySQLPlatform ;
9+ use Doctrine \Migrations \AbstractMigration ;
10+ use Doctrine \DBAL \Schema \Schema ;
11+
12+ final class <className> extends AbstractMigration
13+ {
14+ public function getDescription (): string
15+ {
16+ return '<comment> ' ;
17+ }
18+
19+ public function up (Schema $ schema ): void
20+ {
21+ $ platform = $ this ->connection ->getDatabasePlatform ();
22+ $ this ->skipIf (!$ platform instanceof <platform>, sprintf (
23+ 'Unsupported platform for this migration: %s ' ,
24+ get_class ($ platform )
25+ ));
26+
27+ <up>
28+ }
29+
30+ public function down (Schema $ schema ): void
31+ {
32+ $ platform = $ this ->connection ->getDatabasePlatform ();
33+ $ this ->skipIf (!$ platform instanceof <platform>, sprintf (
34+ 'Unsupported platform for this migration: %s ' ,
35+ get_class ($ platform )
36+ ));
37+
38+ <down>
39+ }
40+ }
You can’t perform that action at this time.
0 commit comments