From a42f38d9fb7906b785285fab2a09f8c2b9efe996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 6 Nov 2016 12:02:39 +0100 Subject: Added a configuration to define the redirection after archiving an entry Fix #496 --- app/DoctrineMigrations/Version20161106113822.php | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 app/DoctrineMigrations/Version20161106113822.php (limited to 'app') diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php new file mode 100644 index 00000000..41e64a4a --- /dev/null +++ b/app/DoctrineMigrations/Version20161106113822.php @@ -0,0 +1,42 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->addSql('ALTER TABLE "'.$this->getTable('config').'" ADD action_mark_as_read INT DEFAULT 0'); + } + + /** + * @param Schema $schema + */ + 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->addSql('ALTER TABLE "'.$this->getTable('config').'" DROP action_mark_as_read'); + } +} -- cgit v1.2.3