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 |
style_update_p2.php
001 <?php
002 /**
003 *
004 * This file is part of the phpBB Forum Software package.
005 *
006 * @copyright (c) phpBB Limited <https://www.phpbb.com>
007 * @license GNU General Public License, version 2 (GPL-2.0)
008 *
009 * For full copyright and license information, please see
010 * the docs/CREDITS.txt file.
011 *
012 */
013
014 namespace phpbb\db\migration\data\v310;
015
016 class style_update_p2 extends \phpbb\db\migration\migration
017 {
018 public function effectively_installed()
019 {
020 return !$this->db_tools->sql_table_exists($this->table_prefix . 'styles_imageset');
021 }
022
023 static public function depends_on()
024 {
025 return array('\phpbb\db\migration\data\v310\style_update_p1');
026 }
027
028 public function update_schema()
029 {
030 return array(
031 'drop_keys' => array(
032 $this->table_prefix . 'styles' => array(
033 'imageset_id',
034 'template_id',
035 'theme_id',
036 ),
037 ),
038
039 'drop_columns' => array(
040 $this->table_prefix . 'styles' => array(
041 'imageset_id',
042 'template_id',
043 'theme_id',
044 ),
045 ),
046
047 'drop_tables' => array(
048 $this->table_prefix . 'styles_imageset',
049 $this->table_prefix . 'styles_imageset_data',
050 $this->table_prefix . 'styles_template',
051 $this->table_prefix . 'styles_template_data',
052 $this->table_prefix . 'styles_theme',
053 ),
054 );
055 }
056
057 public function revert_schema()
058 {
059 return array(
060 'add_columns' => array(
061 $this->table_prefix . 'styles' => array(
062 'imageset_id' => array('UINT', 0),
063 'template_id' => array('UINT', 0),
064 'theme_id' => array('UINT', 0),
065 ),
066 ),
067
068 'add_index' => array(
069 $this->table_prefix . 'styles' => array(
070 'imageset_id' => array('imageset_id'),
071 'template_id' => array('template_id'),
072 'theme_id' => array('theme_id'),
073 ),
074 ),
075
076 'add_tables' => array(
077 $this->table_prefix . 'styles_imageset' => array(
078 'COLUMNS' => array(
079 'imageset_id' => array('UINT', null, 'auto_increment'),
080 'imageset_name' => array('VCHAR_UNI:255', ''),
081 'imageset_copyright' => array('VCHAR_UNI', ''),
082 'imageset_path' => array('VCHAR:100', ''),
083 ),
084 'PRIMARY_KEY' => 'imageset_id',
085 'KEYS' => array(
086 'imgset_nm' => array('UNIQUE', 'imageset_name'),
087 ),
088 ),
089 $this->table_prefix . 'styles_imageset_data' => array(
090 'COLUMNS' => array(
091 'image_id' => array('UINT', null, 'auto_increment'),
092 'image_name' => array('VCHAR:200', ''),
093 'image_filename' => array('VCHAR:200', ''),
094 'image_lang' => array('VCHAR:30', ''),
095 'image_height' => array('USINT', 0),
096 'image_width' => array('USINT', 0),
097 'imageset_id' => array('UINT', 0),
098 ),
099 'PRIMARY_KEY' => 'image_id',
100 'KEYS' => array(
101 'i_d' => array('INDEX', 'imageset_id'),
102 ),
103 ),
104 $this->table_prefix . 'styles_template' => array(
105 'COLUMNS' => array(
106 'template_id' => array('UINT', null, 'auto_increment'),
107 'template_name' => array('VCHAR_UNI:255', ''),
108 'template_copyright' => array('VCHAR_UNI', ''),
109 'template_path' => array('VCHAR:100', ''),
110 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
111 'template_storedb' => array('BOOL', 0),
112 'template_inherits_id' => array('UINT:4', 0),
113 'template_inherit_path' => array('VCHAR', ''),
114 ),
115 'PRIMARY_KEY' => 'template_id',
116 'KEYS' => array(
117 'tmplte_nm' => array('UNIQUE', 'template_name'),
118 ),
119 ),
120 $this->table_prefix . 'styles_template_data' => array(
121 'COLUMNS' => array(
122 'template_id' => array('UINT', 0),
123 'template_filename' => array('VCHAR:100', ''),
124 'template_included' => array('TEXT', ''),
125 'template_mtime' => array('TIMESTAMP', 0),
126 'template_data' => array('MTEXT_UNI', ''),
127 ),
128 'KEYS' => array(
129 'tid' => array('INDEX', 'template_id'),
130 'tfn' => array('INDEX', 'template_filename'),
131 ),
132 ),
133 $this->table_prefix . 'styles_theme' => array(
134 'COLUMNS' => array(
135 'theme_id' => array('UINT', null, 'auto_increment'),
136 'theme_name' => array('VCHAR_UNI:255', ''),
137 'theme_copyright' => array('VCHAR_UNI', ''),
138 'theme_path' => array('VCHAR:100', ''),
139 'theme_storedb' => array('BOOL', 0),
140 'theme_mtime' => array('TIMESTAMP', 0),
141 'theme_data' => array('MTEXT_UNI', ''),
142 ),
143 'PRIMARY_KEY' => 'theme_id',
144 'KEYS' => array(
145 'theme_name' => array('UNIQUE', 'theme_name'),
146 ),
147 ),
148 ),
149 );
150 }
151 }
152