]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Replaced abortIf with skipIf
authorNicolas Lœuillet <nicolas@loeuillet.org>
Sat, 26 Nov 2016 12:34:36 +0000 (13:34 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 28 Nov 2016 13:28:35 +0000 (14:28 +0100)
12 files changed:
app/DoctrineMigrations/Version20160812120952.php
app/DoctrineMigrations/Version20160911214952.php
app/DoctrineMigrations/Version20160916201049.php
app/DoctrineMigrations/Version20161001072726.php
app/DoctrineMigrations/Version20161022134138.php
app/DoctrineMigrations/Version20161031132655.php
app/DoctrineMigrations/Version20161104073720.php
app/DoctrineMigrations/Version20161106113822.php
app/DoctrineMigrations/Version20161117071626.php
app/DoctrineMigrations/Version20161118134328.php
app/DoctrineMigrations/Version20161122144743.php
app/DoctrineMigrations/Version20161122203647.php

index 3ed1b79838f6ac397e3d5fb930920b1f9b8a9fac..a5d11e3ff03789559d3343c5bd8ba5ca1fb3af1b 100644 (file)
@@ -50,7 +50,7 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-        $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
+        $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
 
         $this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' DROP COLUMN name');
     }
index f14f7bc6f825a61564f4e376f402f2328ccb4675..53e5cf85e846d0d50ea6b136229f4b00fac9693c 100644 (file)
@@ -21,7 +21,7 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI
 
     private function getTable($tableName)
     {
-        return $this->container->getParameter('database_table_prefix') . $tableName;
+        return $this->container->getParameter('database_table_prefix').$tableName;
     }
 
     /**
index 5db001082e49391868eb4fb9da3b191512c9ab4d..83ed6b610fa4a707ce02e842259e7e988f5e8997 100644 (file)
@@ -40,7 +40,7 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-        $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
+        $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
 
         $this->addSql('ALTER TABLE "'.$this->getTable('config').'" DROP pocket_consumer_key');
         $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')");
index 237db93206d45bbba72c4357d3425a7275aa0a6c..5ab88555c2bc3225ab4c31245ea141215533f8e4 100644 (file)
@@ -21,7 +21,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
 
     private function getTable($tableName)
     {
-        return $this->container->getParameter('database_table_prefix') . $tableName;
+        return $this->container->getParameter('database_table_prefix').$tableName;
     }
 
     /**
index 5cce55a5eca39e4169040ca3bb933efe86348e1e..b3d02b407ace5c4b6bc5d732208d71e4208dec0c 100644 (file)
@@ -21,7 +21,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
 
     private function getTable($tableName)
     {
-        return $this->container->getParameter('database_table_prefix') . $tableName;
+        return $this->container->getParameter('database_table_prefix').$tableName;
     }
 
     /**
@@ -72,6 +72,5 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
         $this->addSql('ALTER TABLE '.$this->getTable('tag').' CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
 
         $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
-
     }
 }
index c73644288e6b009e3ea46636f46ca8cf00d52fc6..80163c0b223bd29ce06a11cae38f18bd79a4e928 100644 (file)
@@ -21,7 +21,7 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI
 
     private function getTable($tableName)
     {
-        return $this->container->getParameter('database_table_prefix') . $tableName;
+        return $this->container->getParameter('database_table_prefix').$tableName;
     }
 
     /**
@@ -29,7 +29,7 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI
      */
     public function up(Schema $schema)
     {
-        $this->addSql("INSERT INTO \"".$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
+        $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
     }
 
     /**
@@ -37,8 +37,8 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-        $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
+        $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
 
-        $this->addSql("DELETE FROM \"".$this->getTable('craue_config_setting')."\" WHERE name = 'download_images_enabled';");
+        $this->addSql('DELETE FROM "'.$this->getTable('craue_config_setting')."\" WHERE name = 'download_images_enabled';");
     }
 }
index 16503b4b05d9ce6bbc655020d7f192fe4d2315d9..7a0361f80176a806b1bf27c465ec6cb77138b3c9 100644 (file)
@@ -21,7 +21,7 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI
 
     private function getTable($tableName)
     {
-        return $this->container->getParameter('database_table_prefix') . $tableName;
+        return $this->container->getParameter('database_table_prefix').$tableName;
     }
 
     /**
@@ -48,6 +48,5 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-
     }
 }
index a5401b2c35506fd138a4d6daff5ec170e8713569..5e3fd5626599fba53f472e1c6453db2224425158 100644 (file)
@@ -39,7 +39,7 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
+        $this->skipIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
 
         $this->addSql('ALTER TABLE '.$this->getTable('config').' DROP action_mark_as_read');
     }
index 9ae55b5f3dda8577e77a5326dfd26cf27aa9b561..33f5707ebe070a9b81684516e87a95ece9f03258 100644 (file)
@@ -21,7 +21,7 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI
 
     private function getTable($tableName)
     {
-        return $this->container->getParameter('database_table_prefix') . $tableName;
+        return $this->container->getParameter('database_table_prefix').$tableName;
     }
 
     /**
@@ -29,8 +29,8 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI
      */
     public function up(Schema $schema)
     {
-        $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_unmark', 0, 'entry')");
-        $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
+        $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_unmark', 0, 'entry')");
+        $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
     }
 
     /**
@@ -38,7 +38,7 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-        $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'share_unmark';");
-        $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'unmark_url';");
+        $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_unmark';");
+        $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'unmark_url';");
     }
 }
index 76dd90742e7bfd7f4c4733a1a75d93a05d1cd1ec..69eae5a5030530157e987206bd4c46e7a91f282b 100644 (file)
@@ -42,7 +42,7 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
+        $this->skipIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
 
         $this->addSql('ALTER TABLE '.$this->getTable('entry').' DROP http_status');
     }
index ec80c48e5d8d92cc44dccdd8e73c3ae39e4da734..536b833993539f2f3755c529042d8016dd15c2e8 100644 (file)
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
- * Add the restricted_access internal setting for articles with paywall
+ * Add the restricted_access internal setting for articles with paywall.
  */
 class Version20161122144743 extends AbstractMigration implements ContainerAwareInterface
 {
@@ -24,7 +24,7 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
 
     private function getTable($tableName)
     {
-        return $this->container->getParameter('database_table_prefix') . $tableName;
+        return $this->container->getParameter('database_table_prefix').$tableName;
     }
 
     /**
@@ -32,7 +32,7 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
      */
     public function up(Schema $schema)
     {
-        $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')");
+        $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')");
     }
 
     /**
@@ -40,6 +40,6 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-        $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';");
+        $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';");
     }
 }
index 2cb990e1e884cdaf38effff3bc72b980756f6276..354a10e80d6fe245ea7ec7daed21fdcb00719867 100644 (file)
@@ -40,7 +40,7 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
      */
     public function up(Schema $schema)
     {
-        $this->abortIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'This up migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
+        $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'This up migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
 
         $this->skipIf(false === $schema->getTable($this->getTable('user'))->hasColumn('expired'), 'It seems that you already played this migration.');