1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Add migration

This commit is contained in:
Nicolas Lœuillet 2016-04-10 21:48:11 +02:00
parent f3d0cb9106
commit d0545b6bd6
6 changed files with 42 additions and 4 deletions

View file

@ -0,0 +1,26 @@
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20160410190541 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
$this->addSql('ALTER TABLE wallabag_entry ADD uuid LONGTEXT DEFAULT NULL');
$this->addSql('UPDATE wallabag_entry SET uuid = uuid()');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
$this->addSql('ALTER TABLE `wallabag_entry` DROP uuid');
}
}