diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-04-10 21:48:11 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-08-23 16:49:21 +0200 |
commit | d0545b6bd6edc38bf06604900b1e20a60e7c8583 (patch) | |
tree | b137a06de8859e501b658a3e3f78f316332a051b /app | |
parent | f3d0cb91063840f2b05c63954d3fef3e5b8943fd (diff) | |
download | wallabag-d0545b6bd6edc38bf06604900b1e20a60e7c8583.tar.gz wallabag-d0545b6bd6edc38bf06604900b1e20a60e7c8583.tar.zst wallabag-d0545b6bd6edc38bf06604900b1e20a60e7c8583.zip |
Add migration
Diffstat (limited to 'app')
-rw-r--r-- | app/DoctrineMigrations/Version20160410190541.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php new file mode 100644 index 00000000..b30a898c --- /dev/null +++ b/app/DoctrineMigrations/Version20160410190541.php | |||
@@ -0,0 +1,26 @@ | |||
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 | } | ||