]> git.immae.eu Git - github/wallabag/wallabag.git/blame - app/DoctrineMigrations/Version20160410190541.php
Add migration
[github/wallabag/wallabag.git] / app / DoctrineMigrations / Version20160410190541.php
CommitLineData
d0545b6b
NL
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7
8class Version20160410190541 extends AbstractMigration
9{
10 /**
11 * @param Schema $schema
12 */
13 public function up(Schema $schema)
14 {
15 $this->addSql('ALTER TABLE wallabag_entry ADD uuid LONGTEXT DEFAULT NULL');
16 $this->addSql('UPDATE wallabag_entry SET uuid = uuid()');
17 }
18
19 /**
20 * @param Schema $schema
21 */
22 public function down(Schema $schema)
23 {
24 $this->addSql('ALTER TABLE `wallabag_entry` DROP uuid');
25 }
26}