aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-06-14 13:43:09 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-06-14 13:43:09 +0200
commitbfe7a692261760517199a3797191fd214fc2ee6c (patch)
treedaa792d7212ebe39c5f54c4ea825146a93da40ca /app
parent36054f5dd42413ed5877db8c50fe9f1a3c6167c6 (diff)
downloadwallabag-bfe7a692261760517199a3797191fd214fc2ee6c.tar.gz
wallabag-bfe7a692261760517199a3797191fd214fc2ee6c.tar.zst
wallabag-bfe7a692261760517199a3797191fd214fc2ee6c.zip
Fixed migrations with dash into db name
Diffstat (limited to 'app')
-rw-r--r--app/DoctrineMigrations/Version20160401000000.php51
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php21
-rw-r--r--app/DoctrineMigrations/Version20160812120952.php21
-rw-r--r--app/DoctrineMigrations/Version20160911214952.php21
-rw-r--r--app/DoctrineMigrations/Version20160916201049.php21
-rw-r--r--app/DoctrineMigrations/Version20161001072726.php21
-rw-r--r--app/DoctrineMigrations/Version20161022134138.php25
-rw-r--r--app/DoctrineMigrations/Version20161024212538.php21
-rw-r--r--app/DoctrineMigrations/Version20161031132655.php21
-rw-r--r--app/DoctrineMigrations/Version20161104073720.php21
-rw-r--r--app/DoctrineMigrations/Version20161106113822.php21
-rw-r--r--app/DoctrineMigrations/Version20161117071626.php21
-rw-r--r--app/DoctrineMigrations/Version20161118134328.php21
-rw-r--r--app/DoctrineMigrations/Version20161122144743.php21
-rw-r--r--app/DoctrineMigrations/Version20161122203647.php21
-rw-r--r--app/DoctrineMigrations/Version20161128084725.php21
-rw-r--r--app/DoctrineMigrations/Version20161128131503.php21
-rw-r--r--app/DoctrineMigrations/Version20161214094402.php21
-rw-r--r--app/DoctrineMigrations/Version20161214094403.php21
-rw-r--r--app/DoctrineMigrations/Version20170127093841.php21
-rw-r--r--app/DoctrineMigrations/Version20170327194233.php21
-rw-r--r--app/DoctrineMigrations/Version20170405182620.php21
-rw-r--r--app/DoctrineMigrations/Version20170407200919.php21
-rw-r--r--app/DoctrineMigrations/Version20170420134133.php21
-rw-r--r--app/DoctrineMigrations/Version20170501115751.php21
-rw-r--r--app/DoctrineMigrations/Version20170510082609.php21
-rw-r--r--app/DoctrineMigrations/Version20170511115400.php21
-rw-r--r--app/DoctrineMigrations/Version20170511211659.php29
-rw-r--r--app/DoctrineMigrations/Version20170602075214.php21
-rw-r--r--app/DoctrineMigrations/Version20170606155640.php21
-rw-r--r--app/DoctrineMigrations/Version20170719231144.php21
-rw-r--r--app/DoctrineMigrations/Version20170824113337.php21
-rw-r--r--app/DoctrineMigrations/Version20171008195606.php21
-rw-r--r--app/DoctrineMigrations/Version20171105202000.php21
-rw-r--r--app/DoctrineMigrations/Version20171120163128.php21
-rw-r--r--app/DoctrineMigrations/Version20171125164500.php21
36 files changed, 93 insertions, 705 deletions
diff --git a/app/DoctrineMigrations/Version20160401000000.php b/app/DoctrineMigrations/Version20160401000000.php
index e9956b48..c80e3e1f 100644
--- a/app/DoctrineMigrations/Version20160401000000.php
+++ b/app/DoctrineMigrations/Version20160401000000.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Initial database structure. 9 * Initial database structure.
12 */ 10 */
13class Version20160401000000 extends AbstractMigration implements ContainerAwareInterface 11class Version20160401000000 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -76,30 +64,30 @@ SQL
76 case 'mysql': 64 case 'mysql':
77 $sql = <<<SQL 65 $sql = <<<SQL
78CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_5D9649505E237E06 (name), PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 66CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_5D9649505E237E06 (name), PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
79CREATE TABLE `{$this->getTable('entry')}` (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title LONGTEXT DEFAULT NULL, url LONGTEXT DEFAULT NULL, is_archived TINYINT(1) NOT NULL, is_starred TINYINT(1) NOT NULL, content LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype LONGTEXT DEFAULT NULL, language LONGTEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name LONGTEXT DEFAULT NULL, preview_picture LONGTEXT DEFAULT NULL, is_public TINYINT(1) DEFAULT '0', INDEX IDX_F4D18282A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 67CREATE TABLE {$this->getTable('entry')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title LONGTEXT DEFAULT NULL, url LONGTEXT DEFAULT NULL, is_archived TINYINT(1) NOT NULL, is_starred TINYINT(1) NOT NULL, content LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype LONGTEXT DEFAULT NULL, language LONGTEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name LONGTEXT DEFAULT NULL, preview_picture LONGTEXT DEFAULT NULL, is_public TINYINT(1) DEFAULT '0', INDEX IDX_F4D18282A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
80CREATE TABLE {$this->getTable('entry_tag')} (entry_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_C9F0DD7CBA364942 (entry_id), INDEX IDX_C9F0DD7CBAD26311 (tag_id), PRIMARY KEY(entry_id, tag_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 68CREATE TABLE {$this->getTable('entry_tag')} (entry_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_C9F0DD7CBA364942 (entry_id), INDEX IDX_C9F0DD7CBAD26311 (tag_id), PRIMARY KEY(entry_id, tag_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
81CREATE TABLE `{$this->getTable('config')}` (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INT NOT NULL, language VARCHAR(255) NOT NULL, rss_token VARCHAR(255) DEFAULT NULL, rss_limit INT DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, UNIQUE INDEX UNIQ_87E64C53A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 69CREATE TABLE {$this->getTable('config')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INT NOT NULL, language VARCHAR(255) NOT NULL, rss_token VARCHAR(255) DEFAULT NULL, rss_limit INT DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, UNIQUE INDEX UNIQ_87E64C53A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
82CREATE TABLE `{$this->getTable('tagging_rule')}` (id INT AUTO_INCREMENT NOT NULL, config_id INT DEFAULT NULL, rule VARCHAR(255) NOT NULL, tags LONGTEXT NOT NULL COMMENT '(DC2Type:simple_array)', INDEX IDX_2D9B3C5424DB0683 (config_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 70CREATE TABLE {$this->getTable('tagging_rule')} (id INT AUTO_INCREMENT NOT NULL, config_id INT DEFAULT NULL, rule VARCHAR(255) NOT NULL, tags LONGTEXT NOT NULL COMMENT '(DC2Type:simple_array)', INDEX IDX_2D9B3C5424DB0683 (config_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
83CREATE TABLE `{$this->getTable('tag')}` (id INT AUTO_INCREMENT NOT NULL, `label` LONGTEXT NOT NULL, slug VARCHAR(128) NOT NULL, UNIQUE INDEX UNIQ_4CA58A8C989D9B62 (slug), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 71CREATE TABLE {$this->getTable('tag')} (id INT AUTO_INCREMENT NOT NULL, `label` LONGTEXT NOT NULL, slug VARCHAR(128) NOT NULL, UNIQUE INDEX UNIQ_4CA58A8C989D9B62 (slug), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
84CREATE TABLE {$this->getTable('oauth2_clients')} (id INT AUTO_INCREMENT NOT NULL, random_id VARCHAR(255) NOT NULL, redirect_uris LONGTEXT NOT NULL COMMENT '(DC2Type:array)', secret VARCHAR(255) NOT NULL, allowed_grant_types LONGTEXT NOT NULL COMMENT '(DC2Type:array)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 72CREATE TABLE {$this->getTable('oauth2_clients')} (id INT AUTO_INCREMENT NOT NULL, random_id VARCHAR(255) NOT NULL, redirect_uris LONGTEXT NOT NULL COMMENT '(DC2Type:array)', secret VARCHAR(255) NOT NULL, allowed_grant_types LONGTEXT NOT NULL COMMENT '(DC2Type:array)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
85CREATE TABLE {$this->getTable('oauth2_access_tokens')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_368A42095F37A13B (token), INDEX IDX_368A420919EB6921 (client_id), INDEX IDX_368A4209A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 73CREATE TABLE {$this->getTable('oauth2_access_tokens')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_368A42095F37A13B (token), INDEX IDX_368A420919EB6921 (client_id), INDEX IDX_368A4209A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
86CREATE TABLE {$this->getTable('oauth2_refresh_tokens')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_20C9FB245F37A13B (token), INDEX IDX_20C9FB2419EB6921 (client_id), INDEX IDX_20C9FB24A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 74CREATE TABLE {$this->getTable('oauth2_refresh_tokens')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_20C9FB245F37A13B (token), INDEX IDX_20C9FB2419EB6921 (client_id), INDEX IDX_20C9FB24A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
87CREATE TABLE {$this->getTable('oauth2_auth_codes')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, redirect_uri LONGTEXT NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_EE52E3FA5F37A13B (token), INDEX IDX_EE52E3FA19EB6921 (client_id), INDEX IDX_EE52E3FAA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 75CREATE TABLE {$this->getTable('oauth2_auth_codes')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, redirect_uri LONGTEXT NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_EE52E3FA5F37A13B (token), INDEX IDX_EE52E3FA19EB6921 (client_id), INDEX IDX_EE52E3FAA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
88CREATE TABLE `{$this->getTable('user')}` (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled TINYINT(1) NOT NULL, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, locked TINYINT(1) NOT NULL, expired TINYINT(1) NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)', credentials_expired TINYINT(1) NOT NULL, credentials_expire_at DATETIME DEFAULT NULL, name LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INT DEFAULT NULL, twoFactorAuthentication TINYINT(1) NOT NULL, trusted LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_1D63E7E592FC23A8 (username_canonical), UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF (email_canonical), UNIQUE INDEX UNIQ_1D63E7E5C05FB297 (confirmation_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 76CREATE TABLE {$this->getTable('user')} (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled TINYINT(1) NOT NULL, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, locked TINYINT(1) NOT NULL, expired TINYINT(1) NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)', credentials_expired TINYINT(1) NOT NULL, credentials_expire_at DATETIME DEFAULT NULL, name LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INT DEFAULT NULL, twoFactorAuthentication TINYINT(1) NOT NULL, trusted LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_1D63E7E592FC23A8 (username_canonical), UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF (email_canonical), UNIQUE INDEX UNIQ_1D63E7E5C05FB297 (confirmation_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
89CREATE TABLE {$this->getTable('annotation')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, entry_id INT DEFAULT NULL, text LONGTEXT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, quote VARCHAR(255) NOT NULL, ranges LONGTEXT NOT NULL COMMENT '(DC2Type:array)', INDEX IDX_A7AED006A76ED395 (user_id), INDEX IDX_A7AED006BA364942 (entry_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; 77CREATE TABLE {$this->getTable('annotation')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, entry_id INT DEFAULT NULL, text LONGTEXT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, quote VARCHAR(255) NOT NULL, ranges LONGTEXT NOT NULL COMMENT '(DC2Type:array)', INDEX IDX_A7AED006A76ED395 (user_id), INDEX IDX_A7AED006BA364942 (entry_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
90ALTER TABLE `{$this->getTable('entry')}` ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES `{$this->getTable('user')}` (id); 78ALTER TABLE {$this->getTable('entry')} ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
91ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES `{$this->getTable('entry')}` (id); 79ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id);
92ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES `{$this->getTable('tag')}` (id); 80ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES {$this->getTable('tag')} (id);
93ALTER TABLE `{$this->getTable('config')}` ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES `{$this->getTable('user')}` (id); 81ALTER TABLE {$this->getTable('config')} ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
94ALTER TABLE `{$this->getTable('tagging_rule')}` ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES `{$this->getTable('config')}` (id); 82ALTER TABLE {$this->getTable('tagging_rule')} ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES {$this->getTable('config')} (id);
95ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id); 83ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
96ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES `{$this->getTable('user')}` (id); 84ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
97ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id); 85ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
98ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES `{$this->getTable('user')}` (id); 86ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
99ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id); 87ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
100ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES `{$this->getTable('user')}` (id); 88ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
101ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES `{$this->getTable('user')}` (id); 89ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
102ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES `{$this->getTable('entry')}` (id); 90ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id);
103SQL 91SQL
104 ; 92 ;
105 foreach (explode("\n", $sql) as $query) { 93 foreach (explode("\n", $sql) as $query) {
@@ -197,9 +185,4 @@ SQL
197 $this->addSql("DROP TABLE {$this->getTable('user')}"); 185 $this->addSql("DROP TABLE {$this->getTable('user')}");
198 $this->addSql("DROP TABLE {$this->getTable('annotation')}"); 186 $this->addSql("DROP TABLE {$this->getTable('annotation')}");
199 } 187 }
200
201 private function getTable($tableName)
202 {
203 return $this->container->getParameter('database_table_prefix') . $tableName;
204 }
205} 188}
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index 55c12ce1..e1bd3e5c 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added foreign keys for account resetting. 9 * Added foreign keys for account resetting.
12 */ 10 */
13class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface 11class Version20160410190541 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -56,9 +44,4 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
56 44
57 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'"); 45 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
58 } 46 }
59
60 private function getTable($tableName)
61 {
62 return $this->container->getParameter('database_table_prefix') . $tableName;
63 }
64} 47}
diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php
index d28f3a71..d09aefa0 100644
--- a/app/DoctrineMigrations/Version20160812120952.php
+++ b/app/DoctrineMigrations/Version20160812120952.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added name field on wallabag_oauth2_clients. 9 * Added name field on wallabag_oauth2_clients.
12 */ 10 */
13class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface 11class Version20160812120952 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -65,9 +53,4 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI
65 $clientsTable->dropColumn('name'); 53 $clientsTable->dropColumn('name');
66 } 54 }
67 } 55 }
68
69 private function getTable($tableName)
70 {
71 return $this->container->getParameter('database_table_prefix') . $tableName;
72 }
73} 56}
diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php
index 08cc8a03..9dc225fd 100644
--- a/app/DoctrineMigrations/Version20160911214952.php
+++ b/app/DoctrineMigrations/Version20160911214952.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added settings for RabbitMQ and Redis imports. 9 * Added settings for RabbitMQ and Redis imports.
12 */ 10 */
13class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface 11class Version20160911214952 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -56,9 +44,4 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI
56 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';"); 44 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
57 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';"); 45 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';");
58 } 46 }
59
60 private function getTable($tableName)
61 {
62 return $this->container->getParameter('database_table_prefix') . $tableName;
63 }
64} 47}
diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php
index 83503bc4..13f99ce1 100644
--- a/app/DoctrineMigrations/Version20160916201049.php
+++ b/app/DoctrineMigrations/Version20160916201049.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added pocket_consumer_key field on wallabag_config. 9 * Added pocket_consumer_key field on wallabag_config.
12 */ 10 */
13class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface 11class Version20160916201049 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -44,9 +32,4 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI
44 $configTable->dropColumn('pocket_consumer_key'); 32 $configTable->dropColumn('pocket_consumer_key');
45 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')"); 33 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')");
46 } 34 }
47
48 private function getTable($tableName)
49 {
50 return $this->container->getParameter('database_table_prefix') . $tableName;
51 }
52} 35}
diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php
index f9d088a3..bb7e6968 100644
--- a/app/DoctrineMigrations/Version20161001072726.php
+++ b/app/DoctrineMigrations/Version20161001072726.php
@@ -2,28 +2,16 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Migrations\SkipMigrationException; 5use Doctrine\DBAL\Migrations\SkipMigrationException;
7use Doctrine\DBAL\Schema\Schema; 6use Doctrine\DBAL\Schema\Schema;
8use Symfony\Component\DependencyInjection\ContainerAwareInterface; 7use Wallabag\CoreBundle\Doctrine\WallabagMigration;
9use Symfony\Component\DependencyInjection\ContainerInterface;
10 8
11/** 9/**
12 * Added pocket_consumer_key field on wallabag_config. 10 * Added pocket_consumer_key field on wallabag_config.
13 */ 11 */
14class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface 12class Version20161001072726 extends WallabagMigration
15{ 13{
16 /** 14 /**
17 * @var ContainerInterface
18 */
19 private $container;
20
21 public function setContainer(ContainerInterface $container = null)
22 {
23 $this->container = $container;
24 }
25
26 /**
27 * @param Schema $schema 15 * @param Schema $schema
28 */ 16 */
29 public function up(Schema $schema) 17 public function up(Schema $schema)
@@ -117,9 +105,4 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
117 { 105 {
118 throw new SkipMigrationException('Too complex ...'); 106 throw new SkipMigrationException('Too complex ...');
119 } 107 }
120
121 private function getTable($tableName)
122 {
123 return $this->container->getParameter('database_table_prefix') . $tableName;
124 }
125} 108}
diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php
index c84f8fbb..231aada7 100644
--- a/app/DoctrineMigrations/Version20161022134138.php
+++ b/app/DoctrineMigrations/Version20161022134138.php
@@ -2,34 +2,22 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Converted database to utf8mb4 encoding (for MySQL only). 9 * Converted database to utf8mb4 encoding (for MySQL only).
12 */ 10 */
13class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface 11class Version20161022134138 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
29 { 17 {
30 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); 18 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
31 19
32 $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); 20 $this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
33 21
34 // convert field length for utf8mb4 22 // convert field length for utf8mb4
35 // http://stackoverflow.com/a/31474509/569101 23 // http://stackoverflow.com/a/31474509/569101
@@ -60,7 +48,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
60 { 48 {
61 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); 49 $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
62 50
63 $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;'); 51 $this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;');
64 52
65 $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); 53 $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
66 $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); 54 $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
@@ -77,9 +65,4 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
77 65
78 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); 66 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
79 } 67 }
80
81 private function getTable($tableName)
82 {
83 return $this->container->getParameter('database_table_prefix') . $tableName;
84 }
85} 68}
diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php
index 698819be..a7e3c3c8 100644
--- a/app/DoctrineMigrations/Version20161024212538.php
+++ b/app/DoctrineMigrations/Version20161024212538.php
@@ -2,28 +2,16 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added user_id column on oauth2_clients to prevent users to delete API clients from other users. 9 * Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
12 */ 10 */
13class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface 11class Version20161024212538 extends WallabagMigration
14{ 12{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 private $constraintName = 'IDX_user_oauth_client'; 13 private $constraintName = 'IDX_user_oauth_client';
21 14
22 public function setContainer(ContainerInterface $container = null)
23 {
24 $this->container = $container;
25 }
26
27 /** 15 /**
28 * @param Schema $schema 16 * @param Schema $schema
29 */ 17 */
@@ -59,9 +47,4 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
59 $clientsTable->removeForeignKey($this->constraintName); 47 $clientsTable->removeForeignKey($this->constraintName);
60 } 48 }
61 } 49 }
62
63 private function getTable($tableName)
64 {
65 return $this->container->getParameter('database_table_prefix') . $tableName;
66 }
67} 50}
diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php
index 0deebdf9..8d576862 100644
--- a/app/DoctrineMigrations/Version20161031132655.php
+++ b/app/DoctrineMigrations/Version20161031132655.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added the internal setting to enable/disable downloading pictures. 9 * Added the internal setting to enable/disable downloading pictures.
12 */ 10 */
13class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface 11class Version20161031132655 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -44,9 +32,4 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI
44 { 32 {
45 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';"); 33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
46 } 34 }
47
48 private function getTable($tableName)
49 {
50 return $this->container->getParameter('database_table_prefix') . $tableName;
51 }
52} 35}
diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php
index f59ad7ba..e2b18a46 100644
--- a/app/DoctrineMigrations/Version20161104073720.php
+++ b/app/DoctrineMigrations/Version20161104073720.php
@@ -2,28 +2,16 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added created_at index on entry table. 9 * Added created_at index on entry table.
12 */ 10 */
13class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface 11class Version20161104073720 extends WallabagMigration
14{ 12{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 private $indexName = 'IDX_entry_created_at'; 13 private $indexName = 'IDX_entry_created_at';
21 14
22 public function setContainer(ContainerInterface $container = null)
23 {
24 $this->container = $container;
25 }
26
27 /** 15 /**
28 * @param Schema $schema 16 * @param Schema $schema
29 */ 17 */
@@ -45,9 +33,4 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI
45 33
46 $entryTable->dropIndex($this->indexName); 34 $entryTable->dropIndex($this->indexName);
47 } 35 }
48
49 private function getTable($tableName)
50 {
51 return $this->container->getParameter('database_table_prefix') . $tableName;
52 }
53} 36}
diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php
index 1d5a865b..3a3c90db 100644
--- a/app/DoctrineMigrations/Version20161106113822.php
+++ b/app/DoctrineMigrations/Version20161106113822.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added action_mark_as_read field on config table. 9 * Added action_mark_as_read field on config table.
12 */ 10 */
13class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface 11class Version20161106113822 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -48,9 +36,4 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI
48 36
49 $configTable->dropColumn('action_mark_as_read'); 37 $configTable->dropColumn('action_mark_as_read');
50 } 38 }
51
52 private function getTable($tableName)
53 {
54 return $this->container->getParameter('database_table_prefix') . $tableName;
55 }
56} 39}
diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php
index 0b34caab..fc66e7e3 100644
--- a/app/DoctrineMigrations/Version20161117071626.php
+++ b/app/DoctrineMigrations/Version20161117071626.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added the internal setting to share articles to unmark.it. 9 * Added the internal setting to share articles to unmark.it.
12 */ 10 */
13class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface 11class Version20161117071626 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -56,9 +44,4 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI
56 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';"); 44 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
57 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';"); 45 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';");
58 } 46 }
59
60 private function getTable($tableName)
61 {
62 return $this->container->getParameter('database_table_prefix') . $tableName;
63 }
64} 47}
diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php
index dab0ff5b..8302408e 100644
--- a/app/DoctrineMigrations/Version20161118134328.php
+++ b/app/DoctrineMigrations/Version20161118134328.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add http_status in `entry_table`. 9 * Add http_status in `entry_table`.
12 */ 10 */
13class Version20161118134328 extends AbstractMigration implements ContainerAwareInterface 11class Version20161118134328 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -48,9 +36,4 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI
48 36
49 $entryTable->dropColumn('http_status'); 37 $entryTable->dropColumn('http_status');
50 } 38 }
51
52 private function getTable($tableName)
53 {
54 return $this->container->getParameter('database_table_prefix') . $tableName;
55 }
56} 39}
diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php
index 15052ad7..08a41f48 100644
--- a/app/DoctrineMigrations/Version20161122144743.php
+++ b/app/DoctrineMigrations/Version20161122144743.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add the restricted_access internal setting for articles with paywall. 9 * Add the restricted_access internal setting for articles with paywall.
12 */ 10 */
13class Version20161122144743 extends AbstractMigration implements ContainerAwareInterface 11class Version20161122144743 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -44,9 +32,4 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
44 { 32 {
45 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';"); 33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
46 } 34 }
47
48 private function getTable($tableName)
49 {
50 return $this->container->getParameter('database_table_prefix') . $tableName;
51 }
52} 35}
diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php
index ef08bd59..60ddeb08 100644
--- a/app/DoctrineMigrations/Version20161122203647.php
+++ b/app/DoctrineMigrations/Version20161122203647.php
@@ -2,10 +2,8 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Methods and properties removed from `FOS\UserBundle\Model\User`. 9 * Methods and properties removed from `FOS\UserBundle\Model\User`.
@@ -18,19 +16,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
18 * You need to drop the fields `expired` and `credentials_expired` from your database 16 * You need to drop the fields `expired` and `credentials_expired` from your database
19 * schema, because they aren't mapped anymore. 17 * schema, because they aren't mapped anymore.
20 */ 18 */
21class Version20161122203647 extends AbstractMigration implements ContainerAwareInterface 19class Version20161122203647 extends WallabagMigration
22{ 20{
23 /** 21 /**
24 * @var ContainerInterface
25 */
26 private $container;
27
28 public function setContainer(ContainerInterface $container = null)
29 {
30 $this->container = $container;
31 }
32
33 /**
34 * @param Schema $schema 22 * @param Schema $schema
35 */ 23 */
36 public function up(Schema $schema) 24 public function up(Schema $schema)
@@ -55,9 +43,4 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
55 $userTable->addColumn('expired', 'smallint', ['notnull' => false]); 43 $userTable->addColumn('expired', 'smallint', ['notnull' => false]);
56 $userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]); 44 $userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]);
57 } 45 }
58
59 private function getTable($tableName)
60 {
61 return $this->container->getParameter('database_table_prefix') . $tableName;
62 }
63} 46}
diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php
index 497a9f21..ef747154 100644
--- a/app/DoctrineMigrations/Version20161128084725.php
+++ b/app/DoctrineMigrations/Version20161128084725.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added list_mode in user config. 9 * Added list_mode in user config.
12 */ 10 */
13class Version20161128084725 extends AbstractMigration implements ContainerAwareInterface 11class Version20161128084725 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -41,9 +29,4 @@ class Version20161128084725 extends AbstractMigration implements ContainerAwareI
41 $configTable = $schema->getTable($this->getTable('config')); 29 $configTable = $schema->getTable($this->getTable('config'));
42 $configTable->dropColumn('list_mode'); 30 $configTable->dropColumn('list_mode');
43 } 31 }
44
45 private function getTable($tableName)
46 {
47 return $this->container->getParameter('database_table_prefix') . $tableName;
48 }
49} 32}
diff --git a/app/DoctrineMigrations/Version20161128131503.php b/app/DoctrineMigrations/Version20161128131503.php
index 9d92983a..cd434617 100644
--- a/app/DoctrineMigrations/Version20161128131503.php
+++ b/app/DoctrineMigrations/Version20161128131503.php
@@ -2,15 +2,13 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Removed locked, credentials_expire_at and expires_at. 9 * Removed locked, credentials_expire_at and expires_at.
12 */ 10 */
13class Version20161128131503 extends AbstractMigration implements ContainerAwareInterface 11class Version20161128131503 extends WallabagMigration
14{ 12{
15 private $fields = [ 13 private $fields = [
16 'locked' => 'smallint', 14 'locked' => 'smallint',
@@ -19,16 +17,6 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI
19 ]; 17 ];
20 18
21 /** 19 /**
22 * @var ContainerInterface
23 */
24 private $container;
25
26 public function setContainer(ContainerInterface $container = null)
27 {
28 $this->container = $container;
29 }
30
31 /**
32 * @param Schema $schema 20 * @param Schema $schema
33 */ 21 */
34 public function up(Schema $schema) 22 public function up(Schema $schema)
@@ -53,9 +41,4 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI
53 $userTable->addColumn($field, $type, ['notnull' => false]); 41 $userTable->addColumn($field, $type, ['notnull' => false]);
54 } 42 }
55 } 43 }
56
57 private function getTable($tableName)
58 {
59 return $this->container->getParameter('database_table_prefix') . $tableName;
60 }
61} 44}
diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php
index 07090b2f..e9f1a302 100644
--- a/app/DoctrineMigrations/Version20161214094402.php
+++ b/app/DoctrineMigrations/Version20161214094402.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Renamed uuid to uid in entry table. 9 * Renamed uuid to uid in entry table.
12 */ 10 */
13class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface 11class Version20161214094402 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -67,9 +55,4 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI
67 $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid'); 55 $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid');
68 } 56 }
69 } 57 }
70
71 private function getTable($tableName)
72 {
73 return $this->container->getParameter('database_table_prefix') . $tableName;
74 }
75} 58}
diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php
index 6b5640e5..1f9e1f6b 100644
--- a/app/DoctrineMigrations/Version20161214094403.php
+++ b/app/DoctrineMigrations/Version20161214094403.php
@@ -2,28 +2,16 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added index on wallabag_entry.uid. 9 * Added index on wallabag_entry.uid.
12 */ 10 */
13class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface 11class Version20161214094403 extends WallabagMigration
14{ 12{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 private $indexName = 'IDX_entry_uid'; 13 private $indexName = 'IDX_entry_uid';
21 14
22 public function setContainer(ContainerInterface $container = null)
23 {
24 $this->container = $container;
25 }
26
27 /** 15 /**
28 * @param Schema $schema 16 * @param Schema $schema
29 */ 17 */
@@ -45,9 +33,4 @@ class Version20161214094403 extends AbstractMigration implements ContainerAwareI
45 33
46 $entryTable->dropIndex($this->indexName); 34 $entryTable->dropIndex($this->indexName);
47 } 35 }
48
49 private function getTable($tableName)
50 {
51 return $this->container->getParameter('database_table_prefix') . $tableName;
52 }
53} 36}
diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php
index fc78a246..491b9383 100644
--- a/app/DoctrineMigrations/Version20170127093841.php
+++ b/app/DoctrineMigrations/Version20170127093841.php
@@ -2,29 +2,17 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived. 9 * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived.
12 */ 10 */
13class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface 11class Version20170127093841 extends WallabagMigration
14{ 12{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 private $indexStarredName = 'IDX_entry_starred'; 13 private $indexStarredName = 'IDX_entry_starred';
21 private $indexArchivedName = 'IDX_entry_archived'; 14 private $indexArchivedName = 'IDX_entry_archived';
22 15
23 public function setContainer(ContainerInterface $container = null)
24 {
25 $this->container = $container;
26 }
27
28 /** 16 /**
29 * @param Schema $schema 17 * @param Schema $schema
30 */ 18 */
@@ -48,9 +36,4 @@ class Version20170127093841 extends AbstractMigration implements ContainerAwareI
48 $entryTable->dropIndex($this->indexStarredName); 36 $entryTable->dropIndex($this->indexStarredName);
49 $entryTable->dropIndex($this->indexArchivedName); 37 $entryTable->dropIndex($this->indexArchivedName);
50 } 38 }
51
52 private function getTable($tableName)
53 {
54 return $this->container->getParameter('database_table_prefix') . $tableName;
55 }
56} 39}
diff --git a/app/DoctrineMigrations/Version20170327194233.php b/app/DoctrineMigrations/Version20170327194233.php
index 3e7e722d..1aa20eb5 100644
--- a/app/DoctrineMigrations/Version20170327194233.php
+++ b/app/DoctrineMigrations/Version20170327194233.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add the share_scuttle internal setting. 9 * Add the share_scuttle internal setting.
12 */ 10 */
13class Version20170327194233 extends AbstractMigration implements ContainerAwareInterface 11class Version20170327194233 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -46,9 +34,4 @@ class Version20170327194233 extends AbstractMigration implements ContainerAwareI
46 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';"); 34 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
47 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';"); 35 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';");
48 } 36 }
49
50 private function getTable($tableName)
51 {
52 return $this->container->getParameter('database_table_prefix') . $tableName;
53 }
54} 37}
diff --git a/app/DoctrineMigrations/Version20170405182620.php b/app/DoctrineMigrations/Version20170405182620.php
index 75793fcb..c7752664 100644
--- a/app/DoctrineMigrations/Version20170405182620.php
+++ b/app/DoctrineMigrations/Version20170405182620.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add published_at and published_by in `entry` table. 9 * Add published_at and published_by in `entry` table.
12 */ 10 */
13class Version20170405182620 extends AbstractMigration implements ContainerAwareInterface 11class Version20170405182620 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -57,9 +45,4 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI
57 45
58 $entryTable->dropColumn('published_by'); 46 $entryTable->dropColumn('published_by');
59 } 47 }
60
61 private function getTable($tableName)
62 {
63 return $this->container->getParameter('database_table_prefix') . $tableName;
64 }
65} 48}
diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php
index 8a11ffe3..ad05eadf 100644
--- a/app/DoctrineMigrations/Version20170407200919.php
+++ b/app/DoctrineMigrations/Version20170407200919.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Remove isPublic in Entry Table. 9 * Remove isPublic in Entry Table.
12 */ 10 */
13class Version20170407200919 extends AbstractMigration implements ContainerAwareInterface 11class Version20170407200919 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -43,9 +31,4 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI
43 31
44 $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]); 32 $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]);
45 } 33 }
46
47 private function getTable($tableName)
48 {
49 return $this->container->getParameter('database_table_prefix') . $tableName;
50 }
51} 34}
diff --git a/app/DoctrineMigrations/Version20170420134133.php b/app/DoctrineMigrations/Version20170420134133.php
index e1947a49..c1732578 100644
--- a/app/DoctrineMigrations/Version20170420134133.php
+++ b/app/DoctrineMigrations/Version20170420134133.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Remove download_pictures in craue_config_setting. 9 * Remove download_pictures in craue_config_setting.
12 */ 10 */
13class Version20170420134133 extends AbstractMigration implements ContainerAwareInterface 11class Version20170420134133 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -44,9 +32,4 @@ class Version20170420134133 extends AbstractMigration implements ContainerAwareI
44 32
45 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_pictures', '1', 'entry')"); 33 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_pictures', '1', 'entry')");
46 } 34 }
47
48 private function getTable($tableName)
49 {
50 return $this->container->getParameter('database_table_prefix') . $tableName;
51 }
52} 35}
diff --git a/app/DoctrineMigrations/Version20170501115751.php b/app/DoctrineMigrations/Version20170501115751.php
index adf2f841..fd238cef 100644
--- a/app/DoctrineMigrations/Version20170501115751.php
+++ b/app/DoctrineMigrations/Version20170501115751.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add site credential table to store username & password for some website (behind authentication or paywall). 9 * Add site credential table to store username & password for some website (behind authentication or paywall).
12 */ 10 */
13class Version20170501115751 extends AbstractMigration implements ContainerAwareInterface 11class Version20170501115751 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -53,9 +41,4 @@ class Version20170501115751 extends AbstractMigration implements ContainerAwareI
53 { 41 {
54 $schema->dropTable($this->getTable('site_credential')); 42 $schema->dropTable($this->getTable('site_credential'));
55 } 43 }
56
57 private function getTable($tableName)
58 {
59 return $this->container->getParameter('database_table_prefix') . $tableName;
60 }
61} 44}
diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php
index 52c70168..541ae1fd 100644
--- a/app/DoctrineMigrations/Version20170510082609.php
+++ b/app/DoctrineMigrations/Version20170510082609.php
@@ -2,15 +2,13 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table. 9 * Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table.
12 */ 10 */
13class Version20170510082609 extends AbstractMigration implements ContainerAwareInterface 11class Version20170510082609 extends WallabagMigration
14{ 12{
15 private $fields = [ 13 private $fields = [
16 'username', 14 'username',
@@ -20,16 +18,6 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
20 ]; 18 ];
21 19
22 /** 20 /**
23 * @var ContainerInterface
24 */
25 private $container;
26
27 public function setContainer(ContainerInterface $container = null)
28 {
29 $this->container = $container;
30 }
31
32 /**
33 * @param Schema $schema 21 * @param Schema $schema
34 */ 22 */
35 public function up(Schema $schema) 23 public function up(Schema $schema)
@@ -52,9 +40,4 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
52 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); 40 $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;');
53 } 41 }
54 } 42 }
55
56 private function getTable($tableName)
57 {
58 return $this->container->getParameter('database_table_prefix') . $tableName;
59 }
60} 43}
diff --git a/app/DoctrineMigrations/Version20170511115400.php b/app/DoctrineMigrations/Version20170511115400.php
index cad2b637..cb80dd45 100644
--- a/app/DoctrineMigrations/Version20170511115400.php
+++ b/app/DoctrineMigrations/Version20170511115400.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Added `headers` field in entry table. 9 * Added `headers` field in entry table.
12 */ 10 */
13class Version20170511115400 extends AbstractMigration implements ContainerAwareInterface 11class Version20170511115400 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -47,9 +35,4 @@ class Version20170511115400 extends AbstractMigration implements ContainerAwareI
47 35
48 $entryTable->dropColumn('headers'); 36 $entryTable->dropColumn('headers');
49 } 37 }
50
51 private function getTable($tableName)
52 {
53 return $this->container->getParameter('database_table_prefix') . $tableName;
54 }
55} 38}
diff --git a/app/DoctrineMigrations/Version20170511211659.php b/app/DoctrineMigrations/Version20170511211659.php
index f004d1b3..00ce7b1f 100644
--- a/app/DoctrineMigrations/Version20170511211659.php
+++ b/app/DoctrineMigrations/Version20170511211659.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Migrations\SkipMigrationException; 5use Doctrine\DBAL\Migrations\SkipMigrationException;
7use Doctrine\DBAL\Schema\Schema; 6use Doctrine\DBAL\Schema\Schema;
8use Symfony\Component\DependencyInjection\ContainerAwareInterface; 7use Wallabag\CoreBundle\Doctrine\WallabagMigration;
9use Symfony\Component\DependencyInjection\ContainerInterface;
10 8
11/** 9/**
12 * Increase the length of the "quote" column of "annotation" table. 10 * Increase the length of the "quote" column of "annotation" table.
13 */ 11 */
14class Version20170511211659 extends AbstractMigration implements ContainerAwareInterface 12class Version20170511211659 extends WallabagMigration
15{ 13{
16 /**
17 * @var ContainerInterface
18 */
19 private $container;
20
21 public function setContainer(ContainerInterface $container = null)
22 {
23 $this->container = $container;
24 }
25
26 public function up(Schema $schema) 14 public function up(Schema $schema)
27 { 15 {
28 $tableName = $this->getTable('annotation'); 16 $tableName = $this->getTable('annotation');
@@ -30,8 +18,8 @@ class Version20170511211659 extends AbstractMigration implements ContainerAwareI
30 switch ($this->connection->getDatabasePlatform()->getName()) { 18 switch ($this->connection->getDatabasePlatform()->getName()) {
31 case 'sqlite': 19 case 'sqlite':
32 $this->addSql(<<<EOD 20 $this->addSql(<<<EOD
33CREATE TEMPORARY TABLE __temp__wallabag_annotation AS 21CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
34 SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges 22 SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
35 FROM ${tableName} 23 FROM ${tableName}
36EOD 24EOD
37 ); 25 );
@@ -56,8 +44,8 @@ EOD
56 ); 44 );
57 45
58 $this->addSql(<<<EOD 46 $this->addSql(<<<EOD
59INSERT INTO ${tableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges) 47INSERT INTO ${tableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges)
60SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges 48SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
61FROM __temp__wallabag_annotation; 49FROM __temp__wallabag_annotation;
62EOD 50EOD
63 ); 51 );
@@ -88,9 +76,4 @@ EOD
88 break; 76 break;
89 } 77 }
90 } 78 }
91
92 private function getTable($tableName)
93 {
94 return $this->container->getParameter('database_table_prefix') . $tableName;
95 }
96} 79}
diff --git a/app/DoctrineMigrations/Version20170602075214.php b/app/DoctrineMigrations/Version20170602075214.php
index 6b6f0035..12997c71 100644
--- a/app/DoctrineMigrations/Version20170602075214.php
+++ b/app/DoctrineMigrations/Version20170602075214.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add api_user_registration in craue_config_setting. 9 * Add api_user_registration in craue_config_setting.
12 */ 10 */
13class Version20170602075214 extends AbstractMigration implements ContainerAwareInterface 11class Version20170602075214 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -44,9 +32,4 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI
44 { 32 {
45 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';"); 33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
46 } 34 }
47
48 private function getTable($tableName)
49 {
50 return $this->container->getParameter('database_table_prefix') . $tableName;
51 }
52} 35}
diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php
index 5f58fc29..153d31b8 100644
--- a/app/DoctrineMigrations/Version20170606155640.php
+++ b/app/DoctrineMigrations/Version20170606155640.php
@@ -2,28 +2,16 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Remove wallabag_url from craue_config_setting. 9 * Remove wallabag_url from craue_config_setting.
12 * It has been moved into the parameters.yml. 10 * It has been moved into the parameters.yml.
13 */ 11 */
14class Version20170606155640 extends AbstractMigration implements ContainerAwareInterface 12class Version20170606155640 extends WallabagMigration
15{ 13{
16 /** 14 /**
17 * @var ContainerInterface
18 */
19 private $container;
20
21 public function setContainer(ContainerInterface $container = null)
22 {
23 $this->container = $container;
24 }
25
26 /**
27 * @param Schema $schema 15 * @param Schema $schema
28 */ 16 */
29 public function up(Schema $schema) 17 public function up(Schema $schema)
@@ -45,9 +33,4 @@ class Version20170606155640 extends AbstractMigration implements ContainerAwareI
45 { 33 {
46 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')"); 34 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
47 } 35 }
48
49 private function getTable($tableName)
50 {
51 return $this->container->getParameter('database_table_prefix') . $tableName;
52 }
53} 36}
diff --git a/app/DoctrineMigrations/Version20170719231144.php b/app/DoctrineMigrations/Version20170719231144.php
index 86754033..04358c7c 100644
--- a/app/DoctrineMigrations/Version20170719231144.php
+++ b/app/DoctrineMigrations/Version20170719231144.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Changed tags to lowercase. 9 * Changed tags to lowercase.
12 */ 10 */
13class Version20170719231144 extends AbstractMigration implements ContainerAwareInterface 11class Version20170719231144 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -108,9 +96,4 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI
108 { 96 {
109 throw new SkipMigrationException('Too complex ...'); 97 throw new SkipMigrationException('Too complex ...');
110 } 98 }
111
112 private function getTable($tableName)
113 {
114 return $this->container->getParameter('database_table_prefix') . $tableName;
115 }
116} 99}
diff --git a/app/DoctrineMigrations/Version20170824113337.php b/app/DoctrineMigrations/Version20170824113337.php
index e54a9bcf..5fc31de9 100644
--- a/app/DoctrineMigrations/Version20170824113337.php
+++ b/app/DoctrineMigrations/Version20170824113337.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add starred_at column and set its value to updated_at for is_starred entries. 9 * Add starred_at column and set its value to updated_at for is_starred entries.
12 */ 10 */
13class Version20170824113337 extends AbstractMigration implements ContainerAwareInterface 11class Version20170824113337 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -60,9 +48,4 @@ class Version20170824113337 extends AbstractMigration implements ContainerAwareI
60 48
61 $entryTable->dropColumn('starred_at'); 49 $entryTable->dropColumn('starred_at');
62 } 50 }
63
64 private function getTable($tableName)
65 {
66 return $this->container->getParameter('database_table_prefix') . $tableName;
67 }
68} 51}
diff --git a/app/DoctrineMigrations/Version20171008195606.php b/app/DoctrineMigrations/Version20171008195606.php
index f09726c8..6974232a 100644
--- a/app/DoctrineMigrations/Version20171008195606.php
+++ b/app/DoctrineMigrations/Version20171008195606.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Changed reading_time field to prevent null value. 9 * Changed reading_time field to prevent null value.
12 */ 10 */
13class Version20171008195606 extends AbstractMigration implements ContainerAwareInterface 11class Version20171008195606 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -57,9 +45,4 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI
57 break; 45 break;
58 } 46 }
59 } 47 }
60
61 private function getTable($tableName)
62 {
63 return $this->container->getParameter('database_table_prefix') . $tableName;
64 }
65} 48}
diff --git a/app/DoctrineMigrations/Version20171105202000.php b/app/DoctrineMigrations/Version20171105202000.php
index 3769045f..5ed787b9 100644
--- a/app/DoctrineMigrations/Version20171105202000.php
+++ b/app/DoctrineMigrations/Version20171105202000.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add origin_url column. 9 * Add origin_url column.
12 */ 10 */
13class Version20171105202000 extends AbstractMigration implements ContainerAwareInterface 11class Version20171105202000 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -47,9 +35,4 @@ class Version20171105202000 extends AbstractMigration implements ContainerAwareI
47 35
48 $entryTable->dropColumn('origin_url'); 36 $entryTable->dropColumn('origin_url');
49 } 37 }
50
51 private function getTable($tableName)
52 {
53 return $this->container->getParameter('database_table_prefix') . $tableName;
54 }
55} 38}
diff --git a/app/DoctrineMigrations/Version20171120163128.php b/app/DoctrineMigrations/Version20171120163128.php
index fc3d4c37..48f10f1d 100644
--- a/app/DoctrineMigrations/Version20171120163128.php
+++ b/app/DoctrineMigrations/Version20171120163128.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add store_article_headers in craue_config_setting. 9 * Add store_article_headers in craue_config_setting.
12 */ 10 */
13class Version20171120163128 extends AbstractMigration implements ContainerAwareInterface 11class Version20171120163128 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -44,9 +32,4 @@ class Version20171120163128 extends AbstractMigration implements ContainerAwareI
44 { 32 {
45 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';"); 33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
46 } 34 }
47
48 private function getTable($tableName)
49 {
50 return $this->container->getParameter('database_table_prefix') . $tableName;
51 }
52} 35}
diff --git a/app/DoctrineMigrations/Version20171125164500.php b/app/DoctrineMigrations/Version20171125164500.php
index 980e0e75..a72463f0 100644
--- a/app/DoctrineMigrations/Version20171125164500.php
+++ b/app/DoctrineMigrations/Version20171125164500.php
@@ -2,27 +2,15 @@
2 2
3namespace Application\Migrations; 3namespace Application\Migrations;
4 4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema; 5use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface; 6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9 7
10/** 8/**
11 * Add shaarli_share_origin_url in craue_config_setting. 9 * Add shaarli_share_origin_url in craue_config_setting.
12 */ 10 */
13class Version20171125164500 extends AbstractMigration implements ContainerAwareInterface 11class Version20171125164500 extends WallabagMigration
14{ 12{
15 /** 13 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 /**
26 * @param Schema $schema 14 * @param Schema $schema
27 */ 15 */
28 public function up(Schema $schema) 16 public function up(Schema $schema)
@@ -44,9 +32,4 @@ class Version20171125164500 extends AbstractMigration implements ContainerAwareI
44 { 32 {
45 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';"); 33 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
46 } 34 }
47
48 private function getTable($tableName)
49 {
50 return $this->container->getParameter('database_table_prefix') . $tableName;
51 }
52} 35}