aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations
diff options
context:
space:
mode:
Diffstat (limited to 'app/DoctrineMigrations')
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php2
-rw-r--r--app/DoctrineMigrations/Version20160812120952.php2
-rw-r--r--app/DoctrineMigrations/Version20160911214952.php2
-rw-r--r--app/DoctrineMigrations/Version20160916201049.php2
-rw-r--r--app/DoctrineMigrations/Version20161001072726.php2
-rw-r--r--app/DoctrineMigrations/Version20161022134138.php2
-rw-r--r--app/DoctrineMigrations/Version20161024212538.php2
-rw-r--r--app/DoctrineMigrations/Version20161031132655.php2
-rw-r--r--app/DoctrineMigrations/Version20161104073720.php2
-rw-r--r--app/DoctrineMigrations/Version20161106113822.php2
-rw-r--r--app/DoctrineMigrations/Version20161117071626.php2
-rw-r--r--app/DoctrineMigrations/Version20161214094402.php2
-rw-r--r--app/DoctrineMigrations/Version20161214094403.php2
-rw-r--r--app/DoctrineMigrations/Version20170127093841.php2
-rw-r--r--app/DoctrineMigrations/Version20170405182620.php55
15 files changed, 69 insertions, 14 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index 6294d842..5e5cae35 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added foreign keys for account resetting 11 * Added foreign keys for account resetting.
12 */ 12 */
13class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface 13class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php
index bd6e8d63..13272267 100644
--- a/app/DoctrineMigrations/Version20160812120952.php
+++ b/app/DoctrineMigrations/Version20160812120952.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added name field on wallabag_oauth2_clients 11 * Added name field on wallabag_oauth2_clients.
12 */ 12 */
13class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface 13class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php
index edef81ed..4eae46e7 100644
--- a/app/DoctrineMigrations/Version20160911214952.php
+++ b/app/DoctrineMigrations/Version20160911214952.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added settings for RabbitMQ and Redis imports 11 * Added settings for RabbitMQ and Redis imports.
12 */ 12 */
13class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface 13class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php
index 9f8e77e7..ff34c894 100644
--- a/app/DoctrineMigrations/Version20160916201049.php
+++ b/app/DoctrineMigrations/Version20160916201049.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added pocket_consumer_key field on wallabag_config 11 * Added pocket_consumer_key field on wallabag_config.
12 */ 12 */
13class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface 13class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php
index f247c236..ad761541 100644
--- a/app/DoctrineMigrations/Version20161001072726.php
+++ b/app/DoctrineMigrations/Version20161001072726.php
@@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
9use Doctrine\DBAL\Migrations\SkipMigrationException; 9use Doctrine\DBAL\Migrations\SkipMigrationException;
10 10
11/** 11/**
12 * Added pocket_consumer_key field on wallabag_config 12 * Added pocket_consumer_key field on wallabag_config.
13 */ 13 */
14class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface 14class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface
15{ 15{
diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php
index c71166a0..39949e7d 100644
--- a/app/DoctrineMigrations/Version20161022134138.php
+++ b/app/DoctrineMigrations/Version20161022134138.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Converted database to utf8mb4 encoding (for MySQL only) 11 * Converted database to utf8mb4 encoding (for MySQL only).
12 */ 12 */
13class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface 13class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php
index ecb872d1..b2f6aaf8 100644
--- a/app/DoctrineMigrations/Version20161024212538.php
+++ b/app/DoctrineMigrations/Version20161024212538.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added user_id column on oauth2_clients to prevent users to delete API clients from other users 11 * Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
12 */ 12 */
13class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface 13class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php
index 83b97ca9..ef846412 100644
--- a/app/DoctrineMigrations/Version20161031132655.php
+++ b/app/DoctrineMigrations/Version20161031132655.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added the internal setting to enable/disable downloading pictures 11 * Added the internal setting to enable/disable downloading pictures.
12 */ 12 */
13class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface 13class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php
index fb8f5fa1..0e05f02e 100644
--- a/app/DoctrineMigrations/Version20161104073720.php
+++ b/app/DoctrineMigrations/Version20161104073720.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added created_at index on entry table 11 * Added created_at index on entry table.
12 */ 12 */
13class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface 13class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php
index de3702a4..facc14f4 100644
--- a/app/DoctrineMigrations/Version20161106113822.php
+++ b/app/DoctrineMigrations/Version20161106113822.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added action_mark_as_read field on config table 11 * Added action_mark_as_read field on config table.
12 */ 12 */
13class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface 13class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php
index 8daa2142..e779eacf 100644
--- a/app/DoctrineMigrations/Version20161117071626.php
+++ b/app/DoctrineMigrations/Version20161117071626.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added the internal setting to share articles to unmark.it 11 * Added the internal setting to share articles to unmark.it.
12 */ 12 */
13class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface 13class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php
index db125f76..8ca32b09 100644
--- a/app/DoctrineMigrations/Version20161214094402.php
+++ b/app/DoctrineMigrations/Version20161214094402.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Renamed uuid to uid in entry table 11 * Renamed uuid to uid in entry table.
12 */ 12 */
13class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface 13class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php
index 5948b5fa..c7326f95 100644
--- a/app/DoctrineMigrations/Version20161214094403.php
+++ b/app/DoctrineMigrations/Version20161214094403.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added index on wallabag_entry.uid 11 * Added index on wallabag_entry.uid.
12 */ 12 */
13class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface 13class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php
index 20c79479..5bfd9670 100644
--- a/app/DoctrineMigrations/Version20170127093841.php
+++ b/app/DoctrineMigrations/Version20170127093841.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived 11 * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived.
12 */ 12 */
13class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface 13class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/app/DoctrineMigrations/Version20170405182620.php b/app/DoctrineMigrations/Version20170405182620.php
new file mode 100644
index 00000000..1e020c17
--- /dev/null
+++ b/app/DoctrineMigrations/Version20170405182620.php
@@ -0,0 +1,55 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Add published_at in `entry` table.
12 */
13class Version20170405182620 extends AbstractMigration implements ContainerAwareInterface
14{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $entryTable = $schema->getTable($this->getTable('entry'));
36
37 $this->skipIf($entryTable->hasColumn('published_at'), 'It seems that you already played this migration.');
38
39 $entryTable->addColumn('published_at', 'datetime', [
40 'notnull' => false,
41 ]);
42 }
43
44 /**
45 * @param Schema $schema
46 */
47 public function down(Schema $schema)
48 {
49 $entryTable = $schema->getTable($this->getTable('entry'));
50
51 $this->skipIf(!$entryTable->hasColumn('published_at'), 'It seems that you already played this migration.');
52
53 $entryTable->dropColumn('published_at');
54 }
55}