From 15e4aea67842ae83f98d9864c5bdafa056381248 Mon Sep 17 00:00:00 2001 From: Maxime Date: Fri, 7 Apr 2017 22:23:20 +0200 Subject: Remove isPublic from Entry entity fix #2598 --- app/DoctrineMigrations/Version20170407200919.php | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170407200919.php (limited to 'app/DoctrineMigrations/Version20170407200919.php') diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php new file mode 100644 index 00000000..71f53b85 --- /dev/null +++ b/app/DoctrineMigrations/Version20170407200919.php @@ -0,0 +1,51 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); + + $entryTable->dropColumn('is_public'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $entryTable = $schema->getTable($this->getTable('entry')); + $this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); + + $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]); + } +} -- cgit v1.2.3 From 01736b5a2ee2a48403a2462014886bf009f18786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 13 Apr 2017 12:57:31 +0200 Subject: Removed is_public in Entry edit form --- app/DoctrineMigrations/Version20170407200919.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/DoctrineMigrations/Version20170407200919.php') diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php index 71f53b85..4b9d475a 100644 --- a/app/DoctrineMigrations/Version20170407200919.php +++ b/app/DoctrineMigrations/Version20170407200919.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Remove isPublic in Entry Table + * Remove isPublic in Entry Table. */ class Version20170407200919 extends AbstractMigration implements ContainerAwareInterface { -- cgit v1.2.3 From f808b01692a835673f328d7221ba8c212caa9b61 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Jul 2017 09:52:38 +0200 Subject: Add a real configuration for CS-Fixer --- app/DoctrineMigrations/Version20170407200919.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/DoctrineMigrations/Version20170407200919.php') diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php index 4b9d475a..8a11ffe3 100644 --- a/app/DoctrineMigrations/Version20170407200919.php +++ b/app/DoctrineMigrations/Version20170407200919.php @@ -22,11 +22,6 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -48,4 +43,9 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } -- cgit v1.2.3