]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | ||
3 | namespace Application\Migrations; | |
4 | ||
5 | use Doctrine\DBAL\Migrations\AbstractMigration; | |
6 | use Doctrine\DBAL\Schema\Schema; | |
7 | ||
8 | class 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 | } |