From 9f01d0fde09fa055a7db9f26e77c5e6b3d6c2224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Nov 2016 11:02:10 +0100 Subject: Added list view --- app/DoctrineMigrations/Version20161128084725.php | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 app/DoctrineMigrations/Version20161128084725.php (limited to 'app/DoctrineMigrations') diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php new file mode 100644 index 00000000..347a4256 --- /dev/null +++ b/app/DoctrineMigrations/Version20161128084725.php @@ -0,0 +1,49 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $configTable = $schema->getTable($this->getTable('config')); + $this->skipIf($configTable->hasColumn('view_mode'), 'It seems that you already played this migration.'); + + $configTable->addColumn('view_mode', 'integer'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $configTable = $schema->getTable($this->getTable('config')); + $configTable->dropColumn('view_mode'); + } +} -- cgit v1.2.3