Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
soft_delete_mod_convert2.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb\db\migration\data\v310;
15
16 /**
17 * Migration to convert the Soft Delete MOD for 3.0
18 *
19 * https://www.phpbb.com/customise/db/mod/soft_delete/
20 */
21 class soft_delete_mod_convert2 extends \phpbb\db\migration\migration
22 {
23 static public function depends_on()
24 {
25 return array(
26 '\phpbb\db\migration\data\v310\soft_delete_mod_convert',
27 );
28 }
29
30 public function effectively_installed()
31 {
32 return !$this->db_tools->sql_column_exists($this->table_prefix . 'posts', 'post_deleted');
33 }
34
35 public function update_schema()
36 {
37 return array(
38 'drop_columns' => array(
39 $this->table_prefix . 'forums' => array('forum_deleted_topic_count', 'forum_deleted_reply_count'),
40 $this->table_prefix . 'posts' => array('post_deleted', 'post_deleted_time'),
41 $this->table_prefix . 'topics' => array('topic_deleted', 'topic_deleted_time', 'topic_deleted_reply_count'),
42 ),
43 );
44 }
45
46 public function revert_schema()
47 {
48 return array(
49 'add_columns' => array(
50 $this->table_prefix . 'forums' => array(
51 'forum_deleted_topic_count' => array('UINT', 0),
52 'forum_deleted_reply_count' => array('UINT', 0),
53 ),
54 $this->table_prefix . 'posts' => array(
55 'post_deleted' => array('UINT', 0),
56 'post_deleted_time' => array('TIMESTAMP', 0),
57 ),
58 $this->table_prefix . 'topics' => array(
59 'topic_deleted' => array('UINT', 0),
60 'topic_deleted_time' => array('TIMESTAMP', 0),
61 'topic_deleted_reply_count' => array('UINT', 0),
62 ),
63 ),
64 );
65 }
66 }
67