From d64bf7953b0e4e793d7f75ec50bf6e42652560b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 22 Nov 2016 14:56:53 +0100 Subject: Added internal setting to enable/disable articles with paywall --- app/DoctrineMigrations/Version20161122144743.php | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 app/DoctrineMigrations/Version20161122144743.php (limited to 'app/DoctrineMigrations') diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php new file mode 100644 index 00000000..ec80c48e --- /dev/null +++ b/app/DoctrineMigrations/Version20161122144743.php @@ -0,0 +1,45 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';"); + } +} -- cgit v1.2.3