mirror of https://github.com/wallabag/wallabag.git
Update all Doctrine deps
Also update these deps to be compatible with latest Doctrine version: - `friendsofsymfony/oauth-server-bundle` - `lexik/form-filter-bundle` - `dama/doctrine-test-bundle`
This commit is contained in:
parent
8f473ecf5c
commit
b3099f68c5
|
@ -22,10 +22,6 @@ updates:
|
|||
- j0k3r
|
||||
- tcitworld
|
||||
- Kdecherf
|
||||
ignore:
|
||||
- dependency-name: doctrine/doctrine-migrations-bundle
|
||||
versions:
|
||||
- "> 1.3.2"
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20160401000000 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
|
||||
|
||||
|
@ -70,7 +70,7 @@ CREATE TABLE {$this->getTable('oauth2_clients')} (id INT AUTO_INCREMENT NOT NULL
|
|||
CREATE 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;
|
||||
CREATE 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;
|
||||
CREATE 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;
|
||||
CREATE 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;
|
||||
CREATE 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)', 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;
|
||||
CREATE 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;
|
||||
ALTER TABLE {$this->getTable('entry')} ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||
ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id);
|
||||
|
@ -127,7 +127,7 @@ CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON {$this->getTable('user')} (username
|
|||
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON {$this->getTable('user')} (email_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON {$this->getTable('user')} (confirmation_token);
|
||||
COMMENT ON COLUMN {$this->getTable('user')}.roles IS '(DC2Type:array)';
|
||||
COMMENT ON COLUMN {$this->getTable('user')}.trusted IS '(DC2Type:json_array)';
|
||||
COMMENT ON COLUMN {$this->getTable('user')}.trusted IS '(DC2Type:json)';
|
||||
CREATE TABLE {$this->getTable('annotation')} (id INT NOT NULL, user_id INT DEFAULT NULL, entry_id INT DEFAULT NULL, text TEXT NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, quote VARCHAR(255) NOT NULL, ranges TEXT NOT NULL, PRIMARY KEY(id));
|
||||
CREATE INDEX IDX_A7AED006A76ED395 ON {$this->getTable('annotation')} (user_id);
|
||||
CREATE INDEX IDX_A7AED006BA364942 ON {$this->getTable('annotation')} (entry_id);
|
||||
|
@ -164,7 +164,7 @@ SQL
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('tagging_rule')}");
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20160410190541 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -24,14 +24,14 @@ class Version20160410190541 extends WallabagMigration
|
|||
$sharePublic = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
|
||||
|
||||
if (false === $sharePublic) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_public', '1', 'entry')");
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$entryTable->dropColumn('uid');
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20160812120952 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||
$this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.');
|
||||
|
@ -31,7 +31,7 @@ class Version20160812120952 extends WallabagMigration
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20160911214952 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$redis = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'");
|
||||
|
||||
if (false === $redis) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_redis', 0, 'import')");
|
||||
|
@ -24,7 +24,7 @@ class Version20160911214952 extends WallabagMigration
|
|||
$rabbitmq = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'");
|
||||
|
||||
if (false === $rabbitmq) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')");
|
||||
|
@ -33,7 +33,7 @@ class Version20160911214952 extends WallabagMigration
|
|||
$this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';");
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20160916201049 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
|
||||
|
@ -20,7 +20,7 @@ class Version20160916201049 extends WallabagMigration
|
|||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
$configTable->dropColumn('pocket_consumer_key');
|
||||
|
|
|
@ -11,7 +11,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161001072726 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
|
@ -24,9 +24,8 @@ class Version20161001072726 extends WallabagMigration
|
|||
WHERE TABLE_NAME = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND CONSTRAINT_NAME LIKE 'FK_%'
|
||||
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
||||
);
|
||||
$query->execute();
|
||||
|
||||
foreach ($query->fetchAll() as $fk) {
|
||||
foreach ($query->fetchAllAssociative() as $fk) {
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']);
|
||||
}
|
||||
break;
|
||||
|
@ -42,9 +41,8 @@ class Version20161001072726 extends WallabagMigration
|
|||
AND conrelid::regclass::text = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
||||
AND n.nspname = 'public';"
|
||||
);
|
||||
$query->execute();
|
||||
|
||||
foreach ($query->fetchAll() as $fk) {
|
||||
foreach ($query->fetchAllAssociative() as $fk) {
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP CONSTRAINT ' . $fk['conname']);
|
||||
}
|
||||
break;
|
||||
|
@ -65,9 +63,8 @@ class Version20161001072726 extends WallabagMigration
|
|||
AND COLUMN_NAME = 'entry_id'
|
||||
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
||||
);
|
||||
$query->execute();
|
||||
|
||||
foreach ($query->fetchAll() as $fk) {
|
||||
foreach ($query->fetchAllAssociative() as $fk) {
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']);
|
||||
}
|
||||
break;
|
||||
|
@ -84,9 +81,8 @@ class Version20161001072726 extends WallabagMigration
|
|||
AND n.nspname = 'public'
|
||||
AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';"
|
||||
);
|
||||
$query->execute();
|
||||
|
||||
foreach ($query->fetchAll() as $fk) {
|
||||
foreach ($query->fetchAllAssociative() as $fk) {
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP CONSTRAINT ' . $fk['conname']);
|
||||
}
|
||||
break;
|
||||
|
@ -95,7 +91,7 @@ class Version20161001072726 extends WallabagMigration
|
|||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161022134138 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
|
@ -38,7 +38,7 @@ class Version20161022134138 extends WallabagMigration
|
|||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class Version20161024212538 extends WallabagMigration
|
|||
{
|
||||
private $constraintName = 'IDX_user_oauth_client';
|
||||
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||
|
||||
|
@ -29,7 +29,7 @@ class Version20161024212538 extends WallabagMigration
|
|||
);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||
|
||||
|
|
|
@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161031132655 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$images = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled'");
|
||||
|
||||
$this->skipIf(false !== $images, 'It seems that you already played this migration.');
|
||||
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ class Version20161104073720 extends WallabagMigration
|
|||
{
|
||||
private $indexName = 'IDX_entry_created_at';
|
||||
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||
|
@ -20,7 +20,7 @@ class Version20161104073720 extends WallabagMigration
|
|||
$entryTable->addIndex(['created_at'], $this->indexName);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161106113822 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
|
||||
|
@ -22,7 +22,7 @@ class Version20161106113822 extends WallabagMigration
|
|||
]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161117071626 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$share = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'");
|
||||
|
||||
if (false === $share) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_unmark', 0, 'entry')");
|
||||
|
@ -24,7 +24,7 @@ class Version20161117071626 extends WallabagMigration
|
|||
$unmark = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'");
|
||||
|
||||
if (false === $unmark) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
|
||||
|
@ -33,7 +33,7 @@ class Version20161117071626 extends WallabagMigration
|
|||
$this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';");
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161118134328 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -22,7 +22,7 @@ class Version20161118134328 extends WallabagMigration
|
|||
]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161122144743 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$access = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access'");
|
||||
|
||||
$this->skipIf(false !== $access, 'It seems that you already played this migration.');
|
||||
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161122203647 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$userTable = $schema->getTable($this->getTable('user'));
|
||||
|
||||
|
@ -28,7 +28,7 @@ class Version20161122203647 extends WallabagMigration
|
|||
$userTable->dropColumn('credentials_expired');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$userTable = $schema->getTable($this->getTable('user'));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161128084725 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
$this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.');
|
||||
|
@ -18,7 +18,7 @@ class Version20161128084725 extends WallabagMigration
|
|||
$configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
$configTable->dropColumn('list_mode');
|
||||
|
|
|
@ -16,7 +16,7 @@ class Version20161128131503 extends WallabagMigration
|
|||
'expires_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$userTable = $schema->getTable($this->getTable('user'));
|
||||
|
||||
|
@ -26,7 +26,7 @@ class Version20161128131503 extends WallabagMigration
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$userTable = $schema->getTable($this->getTable('user'));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20161214094402 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -32,7 +32,7 @@ class Version20161214094402 extends WallabagMigration
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class Version20161214094403 extends WallabagMigration
|
|||
{
|
||||
private $indexName = 'IDX_entry_uid';
|
||||
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||
|
@ -20,7 +20,7 @@ class Version20161214094403 extends WallabagMigration
|
|||
$entryTable->addIndex(['uid'], $this->indexName);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||
|
|
|
@ -13,7 +13,7 @@ class Version20170127093841 extends WallabagMigration
|
|||
private $indexStarredName = 'IDX_entry_starred';
|
||||
private $indexArchivedName = 'IDX_entry_archived';
|
||||
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf($entryTable->hasIndex($this->indexStarredName) && $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.');
|
||||
|
@ -22,7 +22,7 @@ class Version20170127093841 extends WallabagMigration
|
|||
$entryTable->addIndex(['is_archived'], $this->indexArchivedName);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf(false === $entryTable->hasIndex($this->indexStarredName) && false === $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.');
|
||||
|
|
|
@ -10,12 +10,12 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170327194233 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$scuttle = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'");
|
||||
|
||||
$this->skipIf(false !== $scuttle, 'It seems that you already played this migration.');
|
||||
|
||||
|
@ -23,7 +23,7 @@ class Version20170327194233 extends WallabagMigration
|
|||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';");
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170405182620 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -27,7 +27,7 @@ class Version20170405182620 extends WallabagMigration
|
|||
]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170407200919 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
|
||||
|
@ -18,7 +18,7 @@ class Version20170407200919 extends WallabagMigration
|
|||
$entryTable->dropColumn('is_public');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
|
||||
|
|
|
@ -10,17 +10,17 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170420134133 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$downloadPictures = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'");
|
||||
|
||||
$this->skipIf(false !== $downloadPictures, 'It seems that you already played this migration.');
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170501115751 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
|
||||
|
||||
|
@ -31,7 +31,7 @@ class Version20170501115751 extends WallabagMigration
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$schema->dropTable($this->getTable('site_credential'));
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class Version20170510082609 extends WallabagMigration
|
|||
'email_canonical',
|
||||
];
|
||||
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
|
@ -26,7 +26,7 @@ class Version20170510082609 extends WallabagMigration
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170511115400 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Version20170511115400 extends WallabagMigration
|
|||
]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170511211659 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
|
@ -62,7 +62,7 @@ EOD
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$tableName = $this->getTable('annotation');
|
||||
|
||||
|
|
|
@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170602075214 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$apiUserRegistration = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'");
|
||||
|
||||
$this->skipIf(false !== $apiUserRegistration, 'It seems that you already played this migration.');
|
||||
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
|
||||
}
|
||||
|
|
|
@ -11,19 +11,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170606155640 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$apiUserRegistration = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
||||
|
||||
$this->skipIf(false === $apiUserRegistration, 'It seems that you already played this migration.');
|
||||
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170719231144 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
|
@ -21,13 +21,12 @@ class Version20170719231144 extends WallabagMigration
|
|||
GROUP BY LOWER(label)
|
||||
HAVING COUNT(*) > 1'
|
||||
);
|
||||
$dupTags->execute();
|
||||
|
||||
foreach ($dupTags->fetchAll() as $duplicates) {
|
||||
foreach ($dupTags->fetchAllAssociative() as $duplicates) {
|
||||
$label = $duplicates['lower_label'];
|
||||
|
||||
// Retrieve all duplicate tags for a given tag
|
||||
$tags = $this->connection->executeQuery('
|
||||
$tags = $this->connection->query('
|
||||
SELECT id
|
||||
FROM ' . $this->getTable('tag') . '
|
||||
WHERE LOWER(label) = :label
|
||||
|
@ -41,7 +40,7 @@ class Version20170719231144 extends WallabagMigration
|
|||
$newId = null;
|
||||
$ids = [];
|
||||
|
||||
foreach ($tags->fetchAll() as $tag) {
|
||||
foreach ($tags->fetchAllAssociative() as $tag) {
|
||||
// Ignore the first tag as we use it as the new reference tag
|
||||
if ($first) {
|
||||
$first = false;
|
||||
|
@ -86,7 +85,7 @@ class Version20170719231144 extends WallabagMigration
|
|||
);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20170824113337 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Version20170824113337 extends WallabagMigration
|
|||
]);
|
||||
}
|
||||
|
||||
public function postUp(Schema $schema)
|
||||
public function postUp(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf(!$entryTable->hasColumn('starred_at'), 'Unable to add starred_at colum');
|
||||
|
@ -34,7 +34,7 @@ class Version20170824113337 extends WallabagMigration
|
|||
);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20171008195606 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
|
@ -26,7 +26,7 @@ class Version20171008195606 extends WallabagMigration
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20171105202000 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Version20171105202000 extends WallabagMigration
|
|||
]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20171120163128 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$storeArticleHeaders = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers'");
|
||||
|
||||
$this->skipIf(false !== $storeArticleHeaders, 'It seems that you already played this migration.');
|
||||
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
|
||||
}
|
||||
|
|
|
@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20171125164500 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$shaarliShareOriginUrl = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'");
|
||||
|
||||
$this->skipIf(false !== $shaarliShareOriginUrl, 'It seems that you already played this migration.');
|
||||
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20180405182455 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Version20180405182455 extends WallabagMigration
|
|||
]);
|
||||
}
|
||||
|
||||
public function postUp(Schema $schema)
|
||||
public function postUp(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf(!$entryTable->hasColumn('archived_at'), 'Unable to add archived_at colum');
|
||||
|
@ -34,7 +34,7 @@ class Version20180405182455 extends WallabagMigration
|
|||
);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20181128203230 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
||||
|
||||
|
@ -25,7 +25,7 @@ class Version20181128203230 extends WallabagMigration
|
|||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(191)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ final class Version20181202073750 extends WallabagMigration
|
|||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('user', true) . ' AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication FROM ' . $this->getTable('user', true) . '');
|
||||
$this->addSql('DROP TABLE ' . $this->getTable('user', true) . '');
|
||||
$this->addSql('CREATE TABLE ' . $this->getTable('user', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL COLLATE BINARY, username_canonical VARCHAR(180) NOT NULL COLLATE BINARY, email VARCHAR(180) NOT NULL COLLATE BINARY, email_canonical VARCHAR(180) NOT NULL COLLATE BINARY, enabled BOOLEAN NOT NULL, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, emailTwoFactor BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array)
|
||||
, googleAuthenticatorSecret VARCHAR(255) DEFAULT NULL, backupCodes CLOB DEFAULT NULL --(DC2Type:json_array)
|
||||
, googleAuthenticatorSecret VARCHAR(255) DEFAULT NULL, backupCodes CLOB DEFAULT NULL --(DC2Type:json)
|
||||
)');
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('user', true) . ' (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication FROM __temp__' . $this->getTable('user', true) . '');
|
||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('user', true) . '');
|
||||
|
@ -32,7 +32,7 @@ final class Version20181202073750 extends WallabagMigration
|
|||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE twoFactorAuthentication emailTwoFactor BOOLEAN NOT NULL');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json_array)\'');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\'');
|
||||
break;
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
|
||||
|
|
|
@ -118,13 +118,13 @@ final class Version20190129120000 extends WallabagMigration
|
|||
],
|
||||
];
|
||||
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
foreach ($this->settings as $setting) {
|
||||
$settingEnabled = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'");
|
||||
|
||||
if (false !== $settingEnabled) {
|
||||
continue;
|
||||
|
@ -134,7 +134,7 @@ final class Version20190129120000 extends WallabagMigration
|
|||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->skipIf(true, 'These settings are required and should not be removed.');
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20190401105353 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -24,7 +24,7 @@ class Version20190401105353 extends WallabagMigration
|
|||
$entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||
*/
|
||||
class Version20190601125843 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
@ -31,7 +31,7 @@ class Version20190601125843 extends WallabagMigration
|
|||
$entryTable->addIndex(['user_id', 'hashed_given_url'], 'hashed_given_url_user_id', [], ['lengths' => [null, 40]]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ final class Version20190826204730 extends WallabagMigration
|
|||
$previous_rule = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'");
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'");
|
||||
|
||||
if (false === $previous_rule) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('ignore_origin_instance_rule') . " (rule) VALUES ('" . $entity['rule'] . "');");
|
||||
|
|
|
@ -75,10 +75,14 @@ stof_doctrine_extensions:
|
|||
sluggable: true
|
||||
|
||||
doctrine_migrations:
|
||||
dir_name: "%kernel.project_dir%/app/DoctrineMigrations"
|
||||
namespace: Application\Migrations
|
||||
table_name: migration_versions
|
||||
name: Application Migrations
|
||||
migrations_paths:
|
||||
'Application\Migrations': "%kernel.project_dir%/app/DoctrineMigrations"
|
||||
storage:
|
||||
table_storage:
|
||||
table_name: 'migration_versions'
|
||||
version_column_name: 'version'
|
||||
version_column_length: 192
|
||||
executed_at_column_name: 'executed_at'
|
||||
|
||||
fos_rest:
|
||||
param_fetcher_listener: true
|
||||
|
|
|
@ -56,19 +56,18 @@
|
|||
"craue/config-bundle": "^2.3.0",
|
||||
"defuse/php-encryption": "^2.1",
|
||||
"doctrine/collections": "^1.6",
|
||||
"doctrine/common": "^2.13",
|
||||
"doctrine/dbal": "^2.13",
|
||||
"doctrine/doctrine-bundle": "^1.9",
|
||||
"doctrine/doctrine-cache-bundle": "^1.3",
|
||||
"doctrine/doctrine-migrations-bundle": "^1.3",
|
||||
"doctrine/common": "^3.0",
|
||||
"doctrine/dbal": "^3.3",
|
||||
"doctrine/doctrine-bundle": "^2.0",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.2",
|
||||
"doctrine/event-manager": "^1.1",
|
||||
"doctrine/migrations": "^1.8",
|
||||
"doctrine/migrations": "^3.2",
|
||||
"doctrine/orm": "^2.6",
|
||||
"doctrine/persistence": "^1.3",
|
||||
"doctrine/persistence": "^3.0",
|
||||
"egulias/email-validator": "^3.2",
|
||||
"enshrined/svg-sanitize": "^0.15.4",
|
||||
"friendsofsymfony/jsrouting-bundle": "^2.2",
|
||||
"friendsofsymfony/oauth-server-bundle": "^1.5",
|
||||
"friendsofsymfony/oauth-server-bundle": "dev-master#dc8ff343363cf794d30eb1a123610d186a43f162",
|
||||
"friendsofsymfony/rest-bundle": "~3.4",
|
||||
"friendsofsymfony/user-bundle": "^3.1",
|
||||
"guzzlehttp/guzzle": "^5.3.1",
|
||||
|
@ -83,8 +82,8 @@
|
|||
"kphoen/rulerz-bundle": "~0.13",
|
||||
"laminas/laminas-code": "^4.7",
|
||||
"laminas/laminas-diactoros": "^2.3",
|
||||
"lcobucci/jwt": "~4.2.1",
|
||||
"lexik/form-filter-bundle": "^6.1.1",
|
||||
"lcobucci/jwt": "~4.1.5",
|
||||
"lexik/form-filter-bundle": "^7.0",
|
||||
"mgargano/simplehtmldom": "~1.5",
|
||||
"mnapoli/piwik-twig-extension": "^3.0",
|
||||
"nelmio/api-doc-bundle": "^3.0",
|
||||
|
@ -127,7 +126,7 @@
|
|||
"willdurand/hateoas-bundle": "~2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"dama/doctrine-test-bundle": "^6.0",
|
||||
"dama/doctrine-test-bundle": "^7.1",
|
||||
"doctrine/doctrine-fixtures-bundle": "~3.0",
|
||||
"friendsofphp/php-cs-fixer": "~3.4",
|
||||
"friendsoftwig/twigcs": "^6.0",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -31,7 +31,7 @@
|
|||
</whitelist>
|
||||
</filter>
|
||||
|
||||
<listeners>
|
||||
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener" />
|
||||
</listeners>
|
||||
<extensions>
|
||||
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension" />
|
||||
</extensions>
|
||||
</phpunit>
|
||||
|
|
|
@ -139,7 +139,7 @@ class InstallCommand extends Command
|
|||
|
||||
// now check if MySQL isn't too old to handle utf8mb4
|
||||
if ($conn->isConnected() && 'mysql' === $conn->getDatabasePlatform()->getName()) {
|
||||
$version = $conn->query('select version()')->fetchColumn();
|
||||
$version = $conn->query('select version()')->fetchOne();
|
||||
$minimalVersion = '5.5.4';
|
||||
|
||||
if (false === version_compare($version, $minimalVersion, '>')) {
|
||||
|
@ -152,7 +152,7 @@ class InstallCommand extends Command
|
|||
// testing if PostgreSQL > 9.1
|
||||
if ($conn->isConnected() && 'postgresql' === $conn->getDatabasePlatform()->getName()) {
|
||||
// return version should be like "PostgreSQL 9.5.4 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 8.0.0 (clang-800.0.38), 64-bit"
|
||||
$version = $conn->query('SELECT version();')->fetchColumn();
|
||||
$version = $conn->query('SELECT version();')->fetchOne();
|
||||
|
||||
preg_match('/PostgreSQL ([0-9\.]+)/i', $version, $matches);
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@ abstract class WallabagMigration extends AbstractMigration implements ContainerA
|
|||
protected $container;
|
||||
|
||||
// because there are declared as abstract in `AbstractMigration` we need to delarer here too
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
|
|||
private $googleAuthenticatorSecret;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json_array", nullable=true)
|
||||
* @ORM\Column(type="json", nullable=true)
|
||||
*/
|
||||
private $backupCodes;
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ namespace Tests\Wallabag\CoreBundle\Command;
|
|||
|
||||
use DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver;
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Platforms\MySqlPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
|
@ -35,7 +35,7 @@ class InstallCommandTest extends WallabagCoreTestCase
|
|||
|
||||
/** @var Connection $connection */
|
||||
$connection = $this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection();
|
||||
if ($connection->getDatabasePlatform() instanceof PostgreSqlPlatform) {
|
||||
if ($connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
/*
|
||||
* LOG: statement: CREATE DATABASE "wallabag"
|
||||
* ERROR: source database "template1" is being accessed by other users
|
||||
|
@ -89,7 +89,11 @@ class InstallCommandTest extends WallabagCoreTestCase
|
|||
|
||||
/** @var InstallCommand $command */
|
||||
$command = $application->find('wallabag:install');
|
||||
$command->disableRunOtherCommands();
|
||||
|
||||
// enable calling other commands for MySQL only because rollback isn't supported
|
||||
if (!$this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$command->disableRunOtherCommands();
|
||||
}
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->setInputs([
|
||||
|
@ -109,6 +113,10 @@ class InstallCommandTest extends WallabagCoreTestCase
|
|||
|
||||
public function testRunInstallCommandWithReset()
|
||||
{
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->markTestSkipped('Rollback are not properly handled for MySQL, skipping.');
|
||||
}
|
||||
|
||||
$application = new Application($this->getTestClient()->getKernel());
|
||||
|
||||
/** @var InstallCommand $command */
|
||||
|
@ -138,6 +146,10 @@ class InstallCommandTest extends WallabagCoreTestCase
|
|||
|
||||
public function testRunInstallCommandWithDatabaseRemoved()
|
||||
{
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->markTestSkipped('Rollback are not properly handled for MySQL, skipping.');
|
||||
}
|
||||
|
||||
// skipped SQLite check when database is removed because while testing for the connection,
|
||||
// the driver will create the file (so the database) before testing if database exist
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof SqlitePlatform) {
|
||||
|
@ -178,6 +190,10 @@ class InstallCommandTest extends WallabagCoreTestCase
|
|||
|
||||
public function testRunInstallCommandChooseResetSchema()
|
||||
{
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->markTestSkipped('Rollback are not properly handled for MySQL, skipping.');
|
||||
}
|
||||
|
||||
$application = new Application($this->getTestClient()->getKernel());
|
||||
|
||||
/** @var InstallCommand $command */
|
||||
|
@ -208,7 +224,7 @@ class InstallCommandTest extends WallabagCoreTestCase
|
|||
*
|
||||
* I don't know from where the "/tes_/" come from, it should be "/test/" instead ...
|
||||
*/
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySqlPlatform) {
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->markTestSkipped('That test is failing when using MySQL when clearing the cache (see code comment)');
|
||||
}
|
||||
|
||||
|
@ -244,6 +260,10 @@ class InstallCommandTest extends WallabagCoreTestCase
|
|||
|
||||
public function testRunInstallCommandNoInteraction()
|
||||
{
|
||||
if ($this->getTestClient()->getContainer()->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->markTestSkipped('Rollback are not properly handled for MySQL, skipping.');
|
||||
}
|
||||
|
||||
$application = new Application($this->getTestClient()->getKernel());
|
||||
|
||||
/** @var InstallCommand $command */
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
namespace Tests\Wallabag\CoreBundle\Event\Subscriber;
|
||||
|
||||
use Doctrine\Common\EventManager;
|
||||
use Doctrine\DBAL\Platforms\MySqlPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
||||
|
@ -18,20 +18,20 @@ class TablePrefixSubscriberTest extends TestCase
|
|||
public function dataForPrefix()
|
||||
{
|
||||
return [
|
||||
['wallabag_', User::class, '`user`', 'user', 'wallabag_user', '"wallabag_user"', new PostgreSqlPlatform()],
|
||||
['wallabag_', User::class, '`user`', 'user', 'wallabag_user', '`wallabag_user`', new MySqlPlatform()],
|
||||
['wallabag_', User::class, '`user`', 'user', 'wallabag_user', '"wallabag_user"', new PostgreSQLPlatform()],
|
||||
['wallabag_', User::class, '`user`', 'user', 'wallabag_user', '`wallabag_user`', new MySQLPlatform()],
|
||||
['wallabag_', User::class, '`user`', 'user', 'wallabag_user', '"wallabag_user"', new SqlitePlatform()],
|
||||
|
||||
['wallabag_', User::class, 'user', 'user', 'wallabag_user', 'wallabag_user', new PostgreSqlPlatform()],
|
||||
['wallabag_', User::class, 'user', 'user', 'wallabag_user', 'wallabag_user', new MySqlPlatform()],
|
||||
['wallabag_', User::class, 'user', 'user', 'wallabag_user', 'wallabag_user', new PostgreSQLPlatform()],
|
||||
['wallabag_', User::class, 'user', 'user', 'wallabag_user', 'wallabag_user', new MySQLPlatform()],
|
||||
['wallabag_', User::class, 'user', 'user', 'wallabag_user', 'wallabag_user', new SqlitePlatform()],
|
||||
|
||||
['', User::class, '`user`', 'user', 'user', '"user"', new PostgreSqlPlatform()],
|
||||
['', User::class, '`user`', 'user', 'user', '`user`', new MySqlPlatform()],
|
||||
['', User::class, '`user`', 'user', 'user', '"user"', new PostgreSQLPlatform()],
|
||||
['', User::class, '`user`', 'user', 'user', '`user`', new MySQLPlatform()],
|
||||
['', User::class, '`user`', 'user', 'user', '"user"', new SqlitePlatform()],
|
||||
|
||||
['', User::class, 'user', 'user', 'user', 'user', new PostgreSqlPlatform()],
|
||||
['', User::class, 'user', 'user', 'user', 'user', new MySqlPlatform()],
|
||||
['', User::class, 'user', 'user', 'user', 'user', new PostgreSQLPlatform()],
|
||||
['', User::class, 'user', 'user', 'user', 'user', new MySQLPlatform()],
|
||||
['', User::class, 'user', 'user', 'user', 'user', new SqlitePlatform()],
|
||||
];
|
||||
}
|
||||
|
@ -115,6 +115,6 @@ class TablePrefixSubscriberTest extends TestCase
|
|||
|
||||
$this->assertSame('yo_entry', $metaDataEvent->getClassMetadata()->getTableName());
|
||||
$this->assertSame('yo_entry_tag', $metaDataEvent->getClassMetadata()->associationMappings['tags']['joinTable']['name']);
|
||||
$this->assertSame('yo_entry', $metaDataEvent->getClassMetadata()->getQuotedTableName(new MySqlPlatform()));
|
||||
$this->assertSame('yo_entry', $metaDataEvent->getClassMetadata()->getQuotedTableName(new MySQLPlatform()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue