mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 04:18:55 +00:00
Compare commits
1 commit
e2075c0415
...
666a59daca
Author | SHA1 | Date | |
---|---|---|---|
|
666a59daca |
21 changed files with 74 additions and 832 deletions
|
@ -149,7 +149,6 @@ class connection_parameter_factory
|
|||
$enrichment_tags = [
|
||||
'pdo_mysql' => [
|
||||
'charset' => 'UTF8',
|
||||
'platform' => new mysql_platform(),
|
||||
],
|
||||
'oci8' => [
|
||||
'charset' => 'UTF8',
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\doctrine;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
/**
|
||||
* MySQL specific schema handling.
|
||||
*
|
||||
* While adding auto_increment column to MySQL, it must be indexed.
|
||||
* If it's indexed as primary key, it should be declared as NOT NULL
|
||||
* because MySQL primary key columns cannot be NULL.
|
||||
*/
|
||||
class mysql_platform extends AbstractMySQLPlatform
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getAlterTableSQL(TableDiff $diff)
|
||||
{
|
||||
$sql = parent::getAlterTableSQL($diff);
|
||||
$table = $diff->getOldTable();
|
||||
$columns = $diff->getAddedColumns();
|
||||
|
||||
foreach ($columns as $column)
|
||||
{
|
||||
$column_name = $column->getName();
|
||||
if (!empty($column->getAutoincrement()) && $table)
|
||||
{
|
||||
foreach ($sql as $i => $query)
|
||||
{
|
||||
if (stripos($query, "add $column_name"))
|
||||
{
|
||||
if (!$table->getPrimaryKey())
|
||||
{
|
||||
$sql[$i] = str_replace(' DEFAULT NULL', '', $sql[$i]);
|
||||
$sql[$i] .= ' PRIMARY KEY';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql[$i] .= ", ADD KEY ($column_name)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $sql;
|
||||
}
|
||||
}
|
|
@ -14,10 +14,10 @@
|
|||
namespace phpbb\db\doctrine;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
use Doctrine\DBAL\Schema\Sequence;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
use Doctrine\DBAL\Types\BigIntType;
|
||||
use Doctrine\DBAL\Types\IntegerType;
|
||||
use Doctrine\DBAL\Types\SmallIntType;
|
||||
|
@ -31,7 +31,7 @@ use Doctrine\DBAL\Types\Type;
|
|||
* to stay compatible with the existing DB we have to change its
|
||||
* naming and not ours.
|
||||
*/
|
||||
class postgresql_platform extends PostgreSQLPlatform
|
||||
class postgresql_platform extends PostgreSQL94Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
@ -78,36 +78,6 @@ class postgresql_platform extends PostgreSQLPlatform
|
|||
return AbstractPlatform::getDefaultValueDeclarationSQL($column);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getAlterTableSQL(TableDiff $diff)
|
||||
{
|
||||
$sql = parent::getAlterTableSQL($diff);
|
||||
$table_name = $diff->getOldTable()->getName();
|
||||
$columns = $diff->getAddedColumns();
|
||||
$post_sql = $sequence_sql = [];
|
||||
|
||||
foreach ($columns as $column)
|
||||
{
|
||||
$column_name = $column->getName();
|
||||
if (!empty($column->getAutoincrement()))
|
||||
{
|
||||
$sequence = new Sequence($this->getIdentitySequenceName($table_name, $column_name));
|
||||
$sequence_sql[] = $this->getCreateSequenceSQL($sequence);
|
||||
$post_sql[] = 'ALTER SEQUENCE ' . $sequence->getName() . ' OWNED BY ' . $table_name . '.' . $column_name;
|
||||
}
|
||||
}
|
||||
$sql = array_merge($sequence_sql, $sql, $post_sql);
|
||||
|
||||
foreach ($sql as $i => $query)
|
||||
{
|
||||
$sql[$i] = str_replace('{{placeholder_sequence}}', "nextval('{$table_name}_seq')", $query);
|
||||
}
|
||||
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
@ -187,19 +157,31 @@ class postgresql_platform extends PostgreSQLPlatform
|
|||
{
|
||||
// If we have a primary or a unique index, we need to drop the constraint
|
||||
// instead of the index itself or postgreSQL will reject the query.
|
||||
if (is_string($index) && $table !== null && $index === $this->tableName($table) . '_pkey')
|
||||
if ($index instanceof Index)
|
||||
{
|
||||
return $this->getDropConstraintSQL($index, $this->tableName($table));
|
||||
if ($index->isPrimary())
|
||||
{
|
||||
if ($table instanceof Table)
|
||||
{
|
||||
$table = $table->getQuotedName($this);
|
||||
}
|
||||
else if (!is_string($table))
|
||||
{
|
||||
throw new \InvalidArgumentException(
|
||||
__METHOD__ . '() expects $table parameter to be string or ' . Table::class . '.'
|
||||
);
|
||||
}
|
||||
|
||||
return 'ALTER TABLE '.$table.' DROP CONSTRAINT '.$index->getQuotedName($this);
|
||||
}
|
||||
}
|
||||
else if (! is_string($index))
|
||||
{
|
||||
throw new \InvalidArgumentException(
|
||||
__METHOD__ . '() expects $index parameter to be string or ' . Index::class . '.'
|
||||
);
|
||||
}
|
||||
|
||||
return parent::getDropIndexSQL($index, $table);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
private function tableName($table)
|
||||
{
|
||||
return $table instanceof Table ? $table->getName() : (string) $table;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,15 +34,7 @@ class remove_jabber extends migration
|
|||
$this->table_prefix . 'users' => [
|
||||
'user_jabber',
|
||||
],
|
||||
],
|
||||
'add_columns' => [
|
||||
$this->table_prefix . 'user_notifications' => [
|
||||
'id' => ['ULINT', null, 'auto_increment'],
|
||||
],
|
||||
],
|
||||
'add_primary_keys' => [
|
||||
$this->table_prefix . 'user_notifications' => ['id'],
|
||||
],
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -53,12 +45,7 @@ class remove_jabber extends migration
|
|||
$this->table_prefix . 'users' => [
|
||||
'user_jabber' => ['VCHAR_UNI', ''],
|
||||
],
|
||||
],
|
||||
'drop_columns' => [
|
||||
$this->table_prefix . 'user_notifications' => [
|
||||
'id',
|
||||
],
|
||||
],
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -118,22 +105,11 @@ class remove_jabber extends migration
|
|||
{
|
||||
$limit = 1000;
|
||||
|
||||
$sql = 'SELECT id FROM ' . $this->tables['user_notifications'] . "
|
||||
WHERE method = 'notification.method.jabber'
|
||||
ORDER BY id ASC";
|
||||
$result = $this->db->sql_query_limit($sql, $limit, $start ?: 0);
|
||||
$rowset = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
$ids_array = array_column($rowset, 'id');
|
||||
|
||||
if (count($ids_array))
|
||||
{
|
||||
$sql = 'UPDATE ' . $this->tables['user_notifications'] . '
|
||||
SET ' . $this->db->sql_build_array('UPDATE', ['method' => 'notification.method.email']) . '
|
||||
WHERE ' . $this->db->sql_in_set('id', $ids_array);
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
SET ' . $this->db->sql_build_array('UPDATE', ['method' => 'notification.method.email']) . "
|
||||
WHERE method = 'notification.method.jabber'";
|
||||
$this->db->sql_query_limit($sql, $limit, $start ?: 0);
|
||||
|
||||
return count($ids_array) < $limit ? true : $start + $limit;
|
||||
return $this->db->sql_affectedrows() < $limit ? true : $start + $limit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,7 +185,6 @@ class schema_generator
|
|||
'drop_columns' => 'COLUMNS',
|
||||
'change_columns' => 'COLUMNS',
|
||||
'add_index' => 'KEYS',
|
||||
'add_primary_keys' => 'PRIMARY_KEY',
|
||||
'add_unique_index' => 'KEYS',
|
||||
'drop_keys' => 'KEYS',
|
||||
'rename_index' => 'KEYS',
|
||||
|
|
|
@ -377,7 +377,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
|
|||
{
|
||||
if (!$this->exists($class, $parent, $module, true))
|
||||
{
|
||||
throw new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $module);
|
||||
return;
|
||||
}
|
||||
|
||||
$parent_sql = '';
|
||||
|
|
|
@ -96,7 +96,7 @@ class doctrine implements tools_interface
|
|||
*/
|
||||
protected function get_schema(): Schema
|
||||
{
|
||||
return $this->get_schema_manager()->introspectSchema();
|
||||
return $this->get_schema_manager()->createSchema();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -300,6 +300,36 @@ class doctrine implements tools_interface
|
|||
*/
|
||||
public function sql_column_remove(string $table_name, string $column_name)
|
||||
{
|
||||
// Check if this column is part of a primary key. If yes, remove the primary key.
|
||||
$primary_key_indexes = $this->get_filtered_index_list($table_name, false);
|
||||
|
||||
$primary_key_indexes = array_filter($primary_key_indexes, function($index) use ($column_name) {
|
||||
$index_columns = array_map('strtolower', $index->getUnquotedColumns());
|
||||
return in_array($column_name, $index_columns, true) && $index->isPrimary();
|
||||
});
|
||||
|
||||
if (count($primary_key_indexes))
|
||||
{
|
||||
// For PostgreSQL, drop primary index first to avoid "Dependent objects still exist" error
|
||||
if (stripos($this->get_schema_manager()->getDatabasePlatform()->getname(), 'postgresql') !== false)
|
||||
{
|
||||
$this->get_schema_manager()->dropIndex('"primary"', $table_name);
|
||||
}
|
||||
|
||||
$ret = $this->alter_schema(
|
||||
function (Schema $schema) use ($table_name, $column_name): void
|
||||
{
|
||||
$table = $schema->getTable($table_name);
|
||||
$table->dropPrimaryKey();
|
||||
}
|
||||
);
|
||||
|
||||
if ($ret !== true)
|
||||
{
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->alter_schema(
|
||||
function (Schema $schema) use ($table_name, $column_name): void
|
||||
{
|
||||
|
@ -368,7 +398,7 @@ class doctrine implements tools_interface
|
|||
return $this->alter_schema(
|
||||
function (Schema $schema) use ($table_name, $column): void
|
||||
{
|
||||
$this->schema_create_primary_key($schema, $table_name, $column);
|
||||
$this->schema_create_primary_key($schema, $column, $table_name);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -380,7 +410,7 @@ class doctrine implements tools_interface
|
|||
{
|
||||
try
|
||||
{
|
||||
$this->connection->executeQuery($this->connection->getDatabasePlatform()->getTruncateTableSQL($table_name));
|
||||
$this->connection->executeQuery($this->get_schema_manager()->getDatabasePlatform()->getTruncateTableSQL($table_name));
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
@ -485,7 +515,7 @@ class doctrine implements tools_interface
|
|||
|
||||
$comparator = new comparator();
|
||||
$schemaDiff = $comparator->compareSchemas($current_schema, $new_schema);
|
||||
$queries = $schemaDiff->toSql($this->connection->getDatabasePlatform());
|
||||
$queries = $schemaDiff->toSql($this->get_schema_manager()->getDatabasePlatform());
|
||||
|
||||
if ($this->return_statements)
|
||||
{
|
||||
|
@ -497,6 +527,7 @@ class doctrine implements tools_interface
|
|||
// executeQuery() must be used here because $query might return a result set, for instance REPAIR does
|
||||
$this->connection->executeQuery($query);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -628,7 +659,7 @@ class doctrine implements tools_interface
|
|||
|
||||
$table = $schema->createTable($table_name);
|
||||
$short_table_name = table_helper::generate_shortname(self::remove_prefix($table_name, $this->table_prefix));
|
||||
$dbms_name = $this->connection->getDatabasePlatform()->getName();
|
||||
$dbms_name = $this->get_schema_manager()->getDatabasePlatform()->getName();
|
||||
|
||||
foreach ($table_data['COLUMNS'] as $column_name => $column_data)
|
||||
{
|
||||
|
@ -727,7 +758,7 @@ class doctrine implements tools_interface
|
|||
return false;
|
||||
}
|
||||
|
||||
$dbms_name = $this->connection->getDatabasePlatform()->getName();
|
||||
$dbms_name = $this->get_schema_manager()->getDatabasePlatform()->getName();
|
||||
|
||||
list($type, $options) = table_helper::convert_column_data($column_data, $dbms_name);
|
||||
$table->addColumn($column_name, $type, $options);
|
||||
|
@ -759,7 +790,7 @@ class doctrine implements tools_interface
|
|||
return;
|
||||
}
|
||||
|
||||
$dbms_name = $this->connection->getDatabasePlatform()->getName();
|
||||
$dbms_name = $this->get_schema_manager()->getDatabasePlatform()->getName();
|
||||
|
||||
list($type, $options) = table_helper::convert_column_data($column_data, $dbms_name);
|
||||
$options['type'] = Type::getType($type);
|
||||
|
@ -959,16 +990,16 @@ class doctrine implements tools_interface
|
|||
/**
|
||||
* Creates primary key for a table
|
||||
*
|
||||
* @param $column
|
||||
* @param Schema $schema
|
||||
* @param string $table_name
|
||||
* @param array|string $column_name
|
||||
* @param bool $safe_check
|
||||
*
|
||||
* @throws SchemaException
|
||||
*/
|
||||
protected function schema_create_primary_key(Schema $schema, string $table_name, array|string $column_name, bool $safe_check = false): void
|
||||
protected function schema_create_primary_key(Schema $schema, $column, string $table_name, bool $safe_check = false): void
|
||||
{
|
||||
$columns = (is_array($column_name)) ? $column_name : [$column_name];
|
||||
$columns = (is_array($column)) ? $column : [$column];
|
||||
$table = $schema->getTable($table_name);
|
||||
$table->dropPrimaryKey();
|
||||
$table->setPrimaryKey($columns);
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
class schema_add_autoincrement extends \phpbb\db\migration\migration
|
||||
{
|
||||
function update_schema()
|
||||
{
|
||||
return [
|
||||
'add_tables' => [
|
||||
$this->table_prefix . 'noid' => [
|
||||
'COLUMNS' => [
|
||||
'text' => ['VCHAR:50', ''],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'add_columns' => [
|
||||
$this->table_prefix . 'noid' => [
|
||||
'id' => ['UINT:3', null, 'auto_increment'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
function revert_schema()
|
||||
{
|
||||
return [
|
||||
'drop_tables' => [
|
||||
$this->table_prefix . 'noid',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
|
@ -25,7 +25,6 @@ require_once __DIR__ . '/migration/fail.php';
|
|||
require_once __DIR__ . '/migration/installed.php';
|
||||
require_once __DIR__ . '/migration/schema.php';
|
||||
require_once __DIR__ . '/migration/schema_index.php';
|
||||
require_once __DIR__ . '/migration/schema_add_autoincrement.php';
|
||||
|
||||
class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
{
|
||||
|
@ -503,24 +502,4 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function test_add_autoincrement_column()
|
||||
{
|
||||
$this->migrator->set_migrations(['schema_add_autoincrement']);
|
||||
|
||||
while (!$this->migrator->finished())
|
||||
{
|
||||
$this->migrator->update();
|
||||
}
|
||||
|
||||
$this->assertTrue($this->db_tools->sql_table_exists('phpbb_noid'));
|
||||
$this->assertTrue($this->db_tools->sql_column_exists('phpbb_noid', 'id'));
|
||||
|
||||
while ($this->migrator->migration_state('schema_add_autoincrement'))
|
||||
{
|
||||
$this->migrator->revert('schema_add_autoincrement');
|
||||
}
|
||||
|
||||
$this->assertFalse($this->db_tools->sql_table_exists('phpbb_noid'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,284 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<dataset>
|
||||
<table name="phpbb_migrations">
|
||||
<column>migration_name</column>
|
||||
<column>migration_depends_on</column>
|
||||
<column>migration_schema_done</column>
|
||||
<column>migration_data_done</column>
|
||||
<column>migration_data_state</column>
|
||||
<column>migration_start_time</column>
|
||||
<column>migration_end_time</column>
|
||||
</table>
|
||||
<table name="phpbb_config">
|
||||
<column>config_name</column>
|
||||
<column>config_value</column>
|
||||
<row>
|
||||
<value>jab_enable</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_host</value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_package_size</value>
|
||||
<value>0</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_password</value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_port</value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_use_ssl</value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_username</value>
|
||||
<value>user</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_verify_peer</value>
|
||||
<value>0</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_verify_peer_name</value>
|
||||
<value>0</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>jab_allow_self_signed</value>
|
||||
<value>0</value>
|
||||
</row>
|
||||
</table>
|
||||
<table name="phpbb_modules">
|
||||
<column>module_id</column>
|
||||
<column>module_enabled</column>
|
||||
<column>module_display</column>
|
||||
<column>module_basename</column>
|
||||
<column>module_class</column>
|
||||
<column>parent_id</column>
|
||||
<column>left_id</column>
|
||||
<column>right_id</column>
|
||||
<column>module_langname</column>
|
||||
<column>module_mode</column>
|
||||
<column>module_auth</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
<value>acp</value>
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
<value>76</value>
|
||||
<value>ACP_CAT_GENERAL</value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
<value>acp</value>
|
||||
<value>1</value>
|
||||
<value>48</value>
|
||||
<value>59</value>
|
||||
<value>ACP_CLIENT_COMMUNICATION</value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>75</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>acp_jabber</value>
|
||||
<value>acp</value>
|
||||
<value>4</value>
|
||||
<value>53</value>
|
||||
<value>54</value>
|
||||
<value>ACP_JABBER_SETTINGS</value>
|
||||
<value>settings</value>
|
||||
<value>acl_a_jabber</value>
|
||||
</row>
|
||||
</table>
|
||||
<table name="phpbb_acl_options">
|
||||
<column>auth_option_id</column>
|
||||
<column>auth_option</column>
|
||||
<column>is_global</column>
|
||||
<column>is_local</column>
|
||||
<column>founder_only</column>
|
||||
<row>
|
||||
<value>70</value>
|
||||
<value>a_jabber</value>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<value>0</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>121</value>
|
||||
<value>u_sendim</value>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<value>0</value>
|
||||
</row>
|
||||
</table>
|
||||
<table name="phpbb_acl_groups">
|
||||
<column>group_id</column>
|
||||
<column>forum_id</column>
|
||||
<column>auth_option_id</column>
|
||||
<column>auth_role_id</column>
|
||||
<column>auth_setting</column>
|
||||
</table>
|
||||
<table name="phpbb_acl_roles_data">
|
||||
<column>role_id</column>
|
||||
<column>auth_option_id</column>
|
||||
<column>auth_setting</column>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>70</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>121</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>121</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
</table>
|
||||
<table name="phpbb_acl_users">
|
||||
<column>user_id</column>
|
||||
<column>forum_id</column>
|
||||
<column>auth_option_id</column>
|
||||
<column>auth_role_id</column>
|
||||
<column>auth_setting</column>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>7</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>8</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>9</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>10</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>11</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>12</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>13</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>14</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
<value>notification.method.jabber</value>
|
||||
<value>1</value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
</dataset>
|
|
@ -1,166 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
abstract class phpbb_migration_test_base extends phpbb_database_test_case
|
||||
{
|
||||
/** @var \phpbb\auth\auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var \phpbb\cache\driver\driver_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var \phpbb\cache\service */
|
||||
protected $cache_service;
|
||||
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var \phpbb\db\tools\tools_interface */
|
||||
protected $db_tools;
|
||||
|
||||
/** @var \Doctrine\DBAL\Connection */
|
||||
protected $doctrine_db;
|
||||
|
||||
/** @var \phpbb\extension\manager */
|
||||
protected $extension_manager;
|
||||
|
||||
/** @var \phpbb\db\migrator */
|
||||
protected $migrator;
|
||||
|
||||
/** @var \phpbb\db\migration\tool\tool_interface */
|
||||
protected $tools;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var string */
|
||||
protected $fixture;
|
||||
|
||||
/** @var string */
|
||||
protected $migration_class;
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(__DIR__ . $this->fixture);
|
||||
}
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $cache, $db, $phpbb_log, $phpbb_root_path, $phpEx, $skip_add_log, $table_prefix, $user;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
// Disable the logs
|
||||
$skip_add_log = true;
|
||||
|
||||
$db = $this->db = $this->new_dbal();
|
||||
$this->doctrine_db = $this->new_doctrine_dbal();
|
||||
$factory = new \phpbb\db\tools\factory();
|
||||
$this->db_tools = $factory->get($this->doctrine_db);
|
||||
$this->db_tools->set_table_prefix($table_prefix);
|
||||
$this->cache = new phpbb_mock_cache();
|
||||
$this->auth = new \phpbb\auth\auth();
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||
$this->config = new \phpbb\config\db($this->db, $this->cache, 'phpbb_config');
|
||||
$this->config->initialise($this->cache);
|
||||
$cache = $this->cache_service = new \phpbb\cache\service($this->cache, $this->config, $this->db, $phpbb_dispatcher, $phpbb_root_path, $phpEx);
|
||||
|
||||
|
||||
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
|
||||
$lang = new \phpbb\language\language($lang_loader);
|
||||
$user = $this->user = new \phpbb\user($lang, '\phpbb\datetime');
|
||||
|
||||
$phpbb_log = new \phpbb\log\log($this->db, $this->user, $this->auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
|
||||
|
||||
$container = new phpbb_mock_container_builder();
|
||||
$container->set('event_dispatcher', $phpbb_dispatcher);
|
||||
|
||||
$finder_factory = $this->createMock('\phpbb\finder\factory');
|
||||
$this->extension_manager = new \phpbb\extension\manager(
|
||||
$container,
|
||||
$this->db,
|
||||
$this->config,
|
||||
$finder_factory,
|
||||
'phpbb_ext',
|
||||
__DIR__ . '/../../phpBB/',
|
||||
null
|
||||
);
|
||||
|
||||
$module_manager = new \phpbb\module\module_manager($this->cache, $this->db, $this->extension_manager, 'phpbb_modules', $phpbb_root_path, $phpEx);
|
||||
|
||||
$this->tools = array(
|
||||
'config' => new \phpbb\db\migration\tool\config($this->config),
|
||||
'config_text' => new \phpbb\db\migration\tool\config_text(new \phpbb\config\db_text($this->db, 'phpbb_config_text')),
|
||||
'module' => new \phpbb\db\migration\tool\module($this->db, $this->user, $module_manager, 'phpbb_modules'),
|
||||
'permission' => new \phpbb\db\migration\tool\permission($this->db, $this->cache_service, $this->auth, $phpbb_root_path, $phpEx),
|
||||
);
|
||||
|
||||
$this->migrator = new \phpbb\db\migrator(
|
||||
$container,
|
||||
$this->config,
|
||||
$this->db,
|
||||
$this->db_tools,
|
||||
'phpbb_migrations',
|
||||
__DIR__ . '/../../phpBB/',
|
||||
'php',
|
||||
'phpbb_',
|
||||
self::get_core_tables(),
|
||||
$this->tools,
|
||||
new \phpbb\db\migration\helper()
|
||||
);
|
||||
$container->set('migrator', $this->migrator);
|
||||
|
||||
$migration = $this->migrator->get_migration($this->migration_class);
|
||||
$depends = $migration->depends_on();
|
||||
$this->migrator->populate_migrations($depends);
|
||||
|
||||
$this->migrator->set_migrations([$this->migration_class]);
|
||||
}
|
||||
|
||||
protected function apply_migration()
|
||||
{
|
||||
while (!$this->migrator->finished())
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->migrator->update();
|
||||
}
|
||||
catch (\phpbb\db\migration\exception $e)
|
||||
{
|
||||
$this->fail('Applying migration error: ' . $e->__toString());
|
||||
}
|
||||
}
|
||||
|
||||
return $this->migrator->finished();
|
||||
}
|
||||
|
||||
protected function revert_migration()
|
||||
{
|
||||
while ($this->migrator->migration_state($this->migration_class) !== false)
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->migrator->revert($this->migration_class);
|
||||
}
|
||||
catch (\phpbb\db\migration\exception $e)
|
||||
{
|
||||
$this->fail('Reverting migration error: ' . $e->__toString());
|
||||
}
|
||||
}
|
||||
|
||||
return !$this->migrator->migration_state($this->migration_class);
|
||||
}
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/migration_test_base.php';
|
||||
|
||||
class phpbb_migrations_remove_jabber_migration_test extends phpbb_migration_test_base
|
||||
{
|
||||
|
||||
protected $migration_class = '\phpbb\db\migration\data\v400\remove_jabber';
|
||||
protected $fixture = '/fixtures/migration_remove_jabber.xml';
|
||||
|
||||
public function test_remove_jabber_migration()
|
||||
{
|
||||
$sql = "SELECT id FROM phpbb_user_notifications
|
||||
WHERE method = 'notification.method.jabber'";
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rowset = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
$this->assertEquals(14, count($rowset));
|
||||
|
||||
$sql = "SELECT config_name FROM phpbb_config
|
||||
WHERE config_name = 'jab_enable'";
|
||||
$this->assertNotFalse($this->db->sql_query($sql));
|
||||
|
||||
$this->assertTrue($this->tools['permission']->exists('a_jabber'));
|
||||
$this->assertTrue($this->tools['permission']->exists('u_sendim'));
|
||||
$this->assertTrue($this->tools['module']->exists('acp', 'ACP_CLIENT_COMMUNICATION', 'ACP_JABBER_SETTINGS'));
|
||||
|
||||
$this->apply_migration();
|
||||
|
||||
$sql = "SELECT id FROM phpbb_user_notifications
|
||||
WHERE method = 'notification.method.jabber'";
|
||||
$this->db->sql_query($sql);
|
||||
$this->assertFalse($this->db->sql_fetchfield('id'));
|
||||
|
||||
$sql = "SELECT id FROM phpbb_user_notifications
|
||||
WHERE method = 'notification.method.email'";
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rowset = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
$this->assertEquals(14, count($rowset));
|
||||
|
||||
$sql = "SELECT config_name FROM phpbb_config
|
||||
WHERE config_name = 'jab_enable'";
|
||||
$this->db->sql_query($sql);
|
||||
$this->assertFalse($this->db->sql_fetchfield('config_name'));
|
||||
|
||||
$this->assertFalse($this->tools['permission']->exists('a_jabber'));
|
||||
$this->assertFalse($this->tools['permission']->exists('u_sendim'));
|
||||
$this->assertFalse($this->tools['module']->exists('acp', 'ACP_CLIENT_COMMUNICATION', 'ACP_JABBER_SETTINGS'));
|
||||
|
||||
$this->revert_migration();
|
||||
|
||||
$sql = "SELECT config_name FROM phpbb_config
|
||||
WHERE config_name = 'jab_enable'";
|
||||
$this->db->sql_query($sql);
|
||||
$this->assertEquals('jab_enable', $this->db->sql_fetchfield('config_name'));
|
||||
|
||||
$this->assertTrue($this->tools['permission']->exists('a_jabber'));
|
||||
$this->assertTrue($this->tools['permission']->exists('u_sendim'));
|
||||
$this->assertTrue($this->tools['module']->exists('acp', 'ACP_CLIENT_COMMUNICATION', 'ACP_JABBER_SETTINGS'));
|
||||
|
||||
// Apply migration back
|
||||
$this->apply_migration();
|
||||
}
|
||||
}
|
|
@ -164,14 +164,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -179,7 +177,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -187,7 +184,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -195,7 +191,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -203,7 +198,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -211,7 +205,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -219,7 +212,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>7</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
@ -227,7 +219,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>8</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -235,7 +226,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>9</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -243,7 +233,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>10</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -251,7 +240,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>11</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -259,7 +247,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>12</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -267,7 +254,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>13</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -275,7 +261,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>14</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
|
|
@ -119,14 +119,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.bookmark</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -134,7 +132,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.bookmark</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -142,7 +139,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.bookmark</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -150,7 +146,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.bookmark</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -158,7 +153,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.bookmark</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -166,7 +160,6 @@
|
|||
<value>0</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>notification.type.bookmark</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
|
|
@ -155,14 +155,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -170,7 +168,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -178,7 +175,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -186,7 +182,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -194,7 +189,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -202,7 +196,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -210,7 +203,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>7</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
@ -218,7 +210,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>8</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -226,7 +217,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>9</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -234,7 +224,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>10</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -242,7 +231,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>11</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -250,7 +238,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>12</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -258,7 +245,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>13</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -266,7 +252,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>14</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
|
|
@ -136,14 +136,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.mention</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -151,7 +149,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.mention</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -159,7 +156,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.mention</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -167,7 +163,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.mention</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -175,7 +170,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.mention</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -183,7 +177,6 @@
|
|||
<value>0</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>notification.type.mention</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
|
|
@ -155,14 +155,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -170,7 +168,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -178,7 +175,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -186,7 +182,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -194,7 +189,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -202,7 +196,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -210,7 +203,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>7</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
@ -218,7 +210,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>8</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -226,7 +217,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>9</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -234,7 +224,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>10</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -242,7 +231,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>11</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -250,7 +238,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>12</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -258,7 +245,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>13</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -266,7 +252,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>14</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
|
|
@ -103,14 +103,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.needs_approval</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -118,7 +116,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.needs_approval</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -126,7 +123,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.needs_approval</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -134,7 +130,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.needs_approval</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -142,7 +137,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.needs_approval</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -150,7 +144,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>notification.type.needs_approval</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -158,7 +151,6 @@
|
|||
<value>0</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>7</value>
|
||||
<value>notification.type.needs_approval</value>
|
||||
<value>0</value>
|
||||
<value>9</value>
|
||||
|
|
|
@ -91,14 +91,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.quote</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -106,7 +104,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.quote</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -114,7 +111,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.quote</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -122,7 +118,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.quote</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -130,7 +125,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.quote</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
|
|
@ -99,14 +99,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.topic</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -114,7 +112,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.topic</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -122,7 +119,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.topic</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -130,7 +126,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.topic</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
|
|
@ -185,14 +185,12 @@
|
|||
</row>
|
||||
</table>
|
||||
<table name="phpbb_user_notifications">
|
||||
<column>id</column>
|
||||
<column>item_type</column>
|
||||
<column>item_id</column>
|
||||
<column>user_id</column>
|
||||
<column>method</column>
|
||||
<column>notify</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -200,7 +198,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -208,7 +205,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -216,7 +212,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>4</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -224,7 +219,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>5</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -232,7 +226,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>6</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -240,7 +233,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>7</value>
|
||||
<value>notification.type.post</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
@ -248,7 +240,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>8</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
|
@ -256,7 +247,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>9</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
|
@ -264,7 +254,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>10</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>4</value>
|
||||
|
@ -272,7 +261,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>11</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>5</value>
|
||||
|
@ -280,7 +268,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>12</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
|
@ -288,7 +275,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>13</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>7</value>
|
||||
|
@ -296,7 +282,6 @@
|
|||
<value>1</value>
|
||||
</row>
|
||||
<row>
|
||||
<value>14</value>
|
||||
<value>notification.type.forum</value>
|
||||
<value>0</value>
|
||||
<value>8</value>
|
||||
|
|
Loading…
Add table
Reference in a new issue