Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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 |
softdelete_p2.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 class softdelete_p2 extends \phpbb\db\migration\migration
17 {
18 public function effectively_installed()
19 {
20 return !$this->db_tools->sql_column_exists($this->table_prefix . 'posts', 'post_approved');
21 }
22
23 static public function depends_on()
24 {
25 return array(
26 '\phpbb\db\migration\data\v310\dev',
27 '\phpbb\db\migration\data\v310\softdelete_p1',
28 );
29 }
30
31 public function update_schema()
32 {
33 return array(
34 'drop_columns' => array(
35 $this->table_prefix . 'forums' => array('forum_posts', 'forum_topics', 'forum_topics_real'),
36 $this->table_prefix . 'posts' => array('post_approved'),
37 $this->table_prefix . 'topics' => array('topic_approved', 'topic_replies', 'topic_replies_real'),
38 ),
39 'drop_keys' => array(
40 $this->table_prefix . 'posts' => array('post_approved'),
41 $this->table_prefix . 'topics' => array(
42 'forum_appr_last',
43 'topic_approved',
44 ),
45 ),
46 );
47 }
48
49 public function revert_schema()
50 {
51 return array(
52 'add_columns' => array(
53 $this->table_prefix . 'forums' => array(
54 'forum_posts' => array('UINT', 0),
55 'forum_topics' => array('UINT', 0),
56 'forum_topics_real' => array('UINT', 0),
57 ),
58 $this->table_prefix . 'posts' => array(
59 'post_approved' => array('BOOL', 1),
60 ),
61 $this->table_prefix . 'topics' => array(
62 'topic_approved' => array('BOOL', 1),
63 'topic_replies' => array('UINT', 0),
64 'topic_replies_real' => array('UINT', 0),
65 ),
66 ),
67 'add_index' => array(
68 $this->table_prefix . 'posts' => array(
69 'post_approved' => array('post_approved'),
70 ),
71 $this->table_prefix . 'topics' => array(
72 'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'),
73 'topic_approved' => array('topic_approved'),
74 ),
75 ),
76 );
77 }
78 }
79