diff options
Diffstat (limited to 'app/DoctrineMigrations/Version20170710125843.php')
-rw-r--r-- | app/DoctrineMigrations/Version20170710125843.php | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/app/DoctrineMigrations/Version20170710125843.php b/app/DoctrineMigrations/Version20170710125843.php deleted file mode 100644 index 2cf8647a..00000000 --- a/app/DoctrineMigrations/Version20170710125843.php +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Application\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Schema\Schema; | ||
6 | use Wallabag\CoreBundle\Doctrine\WallabagMigration; | ||
7 | |||
8 | /** | ||
9 | * Added `given_url` field in entry table. | ||
10 | */ | ||
11 | class Version20170710125843 extends WallabagMigration | ||
12 | { | ||
13 | /** | ||
14 | * @param Schema $schema | ||
15 | */ | ||
16 | public function up(Schema $schema) | ||
17 | { | ||
18 | $entryTable = $schema->getTable($this->getTable('entry')); | ||
19 | |||
20 | $this->skipIf($entryTable->hasColumn('given_url'), 'It seems that you already played this migration.'); | ||
21 | |||
22 | $entryTable->addColumn('given_url', 'text', [ | ||
23 | 'notnull' => false, | ||
24 | ]); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * @param Schema $schema | ||
29 | */ | ||
30 | public function down(Schema $schema) | ||
31 | { | ||
32 | $entryTable = $schema->getTable($this->getTable('entry')); | ||
33 | |||
34 | $this->skipIf(!$entryTable->hasColumn('given_url'), 'It seems that you already played this migration.'); | ||
35 | |||
36 | $entryTable->dropColumn('given_url'); | ||
37 | } | ||
38 | } | ||