aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-01-21 08:53:09 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-31 14:48:26 +0100
commit63e40f2d7c4074aff0be587c828eb511a6b7c878 (patch)
tree038959b20e15c60841f8f3584c99068f52460939 /app/DoctrineMigrations
parent26975877d76a99f6a3153d3d3b4fc6c9f32687bc (diff)
downloadwallabag-63e40f2d7c4074aff0be587c828eb511a6b7c878.tar.gz
wallabag-63e40f2d7c4074aff0be587c828eb511a6b7c878.tar.zst
wallabag-63e40f2d7c4074aff0be587c828eb511a6b7c878.zip
Add CraueConfig for internal settings
Diffstat (limited to 'app/DoctrineMigrations')
-rw-r--r--app/DoctrineMigrations/Version20160120200534_settings.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/app/DoctrineMigrations/Version20160120200534_settings.php b/app/DoctrineMigrations/Version20160120200534_settings.php
new file mode 100644
index 00000000..34809ff9
--- /dev/null
+++ b/app/DoctrineMigrations/Version20160120200534_settings.php
@@ -0,0 +1,51 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7
8/**
9 * Auto-generated Migration: Please modify to your needs!
10 */
11class Version20160120200534_settings extends AbstractMigration
12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema)
17 {
18 // this up() migration is auto-generated, please modify it to your needs
19 $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
20
21 $this->addSql('CREATE TABLE craue_config_setting (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_B95BA9425E237E06 (name), PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
22 $this->addSql("INSERT INTO `craue_config_setting` (`name`, `value`, `section`) VALUES
23 ('download_pictures', '1', 'entry'),
24 ('carrot', '1', 'entry'),
25 ('share_diaspora', '1', 'entry'),
26 ('diaspora_url', 'http://diasporapod.com', 'entry'),
27 ('share_shaarli', '1', 'entry'),
28 ('shaarli_url', 'http://myshaarli.com', 'entry'),
29 ('share_mail', '1', 'entry'),
30 ('share_twitter', '1', 'entry'),
31 ('export_epub', '1', 'export'),
32 ('export_mobi', '1', 'export'),
33 ('export_pdf', '1', 'export'),
34 ('pocket_consumer_key', NULL, 'import'),
35 ('show_printlink', '1', 'entry'),
36 ('wallabag_support_url', 'https://www.wallabag.org/pages/support.html', 'misc'),
37 ('wallabag_url', 'http://v2.wallabag.org', 'misc')"
38 );
39 }
40
41 /**
42 * @param Schema $schema
43 */
44 public function down(Schema $schema)
45 {
46 // this down() migration is auto-generated, please modify it to your needs
47 $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
48
49 $this->addSql('DROP TABLE craue_config_setting');
50 }
51}