From a4d55a9161144f7e0daafff8da13dabc9e090ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 26 Nov 2016 13:34:36 +0100 Subject: Replaced abortIf with skipIf --- app/DoctrineMigrations/Version20161031132655.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/DoctrineMigrations/Version20161031132655.php') diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index c7364428..80163c0b 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php @@ -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';"); } } -- cgit v1.2.3 From 84c6a48df412af7a15a63de5484c4bbcf27de33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 26 Nov 2016 15:40:42 +0100 Subject: Added dropColumn for SQLite and some enhancements --- app/DoctrineMigrations/Version20161031132655.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'app/DoctrineMigrations/Version20161031132655.php') diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index 80163c0b..39b85ea9 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php @@ -37,8 +37,6 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $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';"); } } -- cgit v1.2.3