mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 15:16:16 +02:00
[feature/merging-style-components] Updating database and acp modules
Removing theme and template tables, adding new columns to styles table, deleting acp modules, deleting code that updates theme in updater PHPBB3-10632
This commit is contained in:
parent
b7d84a586c
commit
ae3b0f736d
@ -1654,43 +1654,14 @@ function get_schema_struct()
|
||||
'style_name' => array('VCHAR_UNI:255', ''),
|
||||
'style_copyright' => array('VCHAR_UNI', ''),
|
||||
'style_active' => array('BOOL', 1),
|
||||
'template_id' => array('UINT', 0),
|
||||
'theme_id' => array('UINT', 0),
|
||||
'style_path' => array('VCHAR:100', ''),
|
||||
'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
|
||||
'style_parent_id' => array('UINT:4', 0),
|
||||
'style_parent_tree' => array('TEXT', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'style_id',
|
||||
'KEYS' => array(
|
||||
'style_name' => array('UNIQUE', 'style_name'),
|
||||
'template_id' => array('INDEX', 'template_id'),
|
||||
'theme_id' => array('INDEX', 'theme_id'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema_data['phpbb_styles_template'] = array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'template_name' => array('VCHAR_UNI:255', ''),
|
||||
'template_copyright' => array('VCHAR_UNI', ''),
|
||||
'template_path' => array('VCHAR:100', ''),
|
||||
'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
|
||||
'template_inherits_id' => array('UINT:4', 0),
|
||||
'template_inherit_path' => array('VCHAR', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'template_id',
|
||||
'KEYS' => array(
|
||||
'tmplte_nm' => array('UNIQUE', 'template_name'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema_data['phpbb_styles_theme'] = array(
|
||||
'COLUMNS' => array(
|
||||
'theme_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'theme_name' => array('VCHAR_UNI:255', ''),
|
||||
'theme_copyright' => array('VCHAR_UNI', ''),
|
||||
'theme_path' => array('VCHAR:100', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'theme_id',
|
||||
'KEYS' => array(
|
||||
'theme_name' => array('UNIQUE', 'theme_name'),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -1091,61 +1091,14 @@ function get_schema_struct()
|
||||
'style_name' => array('VCHAR_UNI:255', ''),
|
||||
'style_copyright' => array('VCHAR_UNI', ''),
|
||||
'style_active' => array('BOOL', 1),
|
||||
'template_id' => array('UINT', 0),
|
||||
'theme_id' => array('UINT', 0),
|
||||
'style_path' => array('VCHAR:100', ''),
|
||||
'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
|
||||
'style_parent_id' => array('UINT:4', 0),
|
||||
'style_parent_tree' => array('TEXT', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'style_id',
|
||||
'KEYS' => array(
|
||||
'style_name' => array('UNIQUE', 'style_name'),
|
||||
'template_id' => array('INDEX', 'template_id'),
|
||||
'theme_id' => array('INDEX', 'theme_id'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema_data['phpbb_styles_template'] = array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'template_name' => array('VCHAR_UNI:255', ''),
|
||||
'template_copyright' => array('VCHAR_UNI', ''),
|
||||
'template_path' => array('VCHAR:100', ''),
|
||||
'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
|
||||
'template_storedb' => array('BOOL', 0),
|
||||
'template_inherits_id' => array('UINT:4', 0),
|
||||
'template_inherit_path' => array('VCHAR', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'template_id',
|
||||
'KEYS' => array(
|
||||
'tmplte_nm' => array('UNIQUE', 'template_name'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema_data['phpbb_styles_template_data'] = array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('UINT', 0),
|
||||
'template_filename' => array('VCHAR:100', ''),
|
||||
'template_included' => array('TEXT', ''),
|
||||
'template_mtime' => array('TIMESTAMP', 0),
|
||||
'template_data' => array('MTEXT_UNI', ''),
|
||||
),
|
||||
'KEYS' => array(
|
||||
'tid' => array('INDEX', 'template_id'),
|
||||
'tfn' => array('INDEX', 'template_filename'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema_data['phpbb_styles_theme'] = array(
|
||||
'COLUMNS' => array(
|
||||
'theme_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'theme_name' => array('VCHAR_UNI:255', ''),
|
||||
'theme_copyright' => array('VCHAR_UNI', ''),
|
||||
'theme_path' => array('VCHAR:100', ''),
|
||||
'theme_storedb' => array('BOOL', 0),
|
||||
'theme_mtime' => array('TIMESTAMP', 0),
|
||||
'theme_data' => array('MTEXT_UNI', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'theme_id',
|
||||
'KEYS' => array(
|
||||
'theme_name' => array('UNIQUE', 'theme_name'),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -1088,6 +1088,12 @@ function database_update_info()
|
||||
PROFILE_FIELDS_TABLE => array(
|
||||
'field_show_on_pm' => array('BOOL', 0),
|
||||
),
|
||||
STYLES_TABLE => array(
|
||||
'style_path' => array('VCHAR:100', ''),
|
||||
'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
|
||||
'style_parent_id' => array('UINT:4', 0),
|
||||
'style_parent_tree' => array('TEXT', ''),
|
||||
),
|
||||
),
|
||||
'change_columns' => array(
|
||||
GROUPS_TABLE => array(
|
||||
@ -1097,20 +1103,16 @@ function database_update_info()
|
||||
'drop_columns' => array(
|
||||
STYLES_TABLE => array(
|
||||
'imageset_id',
|
||||
'template_id',
|
||||
'theme_id',
|
||||
),
|
||||
STYLES_TEMPLATE_TABLE => array(
|
||||
'template_storedb',
|
||||
),
|
||||
STYLES_THEME_TABLE => array(
|
||||
'theme_storedb',
|
||||
'theme_mtime',
|
||||
'theme_data',
|
||||
),
|
||||
),
|
||||
'drop_tables' => array(
|
||||
STYLES_IMAGESET_TABLE,
|
||||
STYLES_IMAGESET_DATA_TABLE,
|
||||
STYLES_TEMPLATE_TABLE,
|
||||
STYLES_TEMPLATE_DATA_TABLE,
|
||||
STYLES_THEME_TABLE,
|
||||
),
|
||||
),
|
||||
);
|
||||
@ -2267,12 +2269,33 @@ function change_database_data(&$no_updates, $version)
|
||||
'auth' => 'acl_a_attach',
|
||||
'cat' => 'ACP_ATTACHMENTS',
|
||||
),
|
||||
'install' => array(
|
||||
'base' => 'acp_styles'
|
||||
'class' => 'acp',
|
||||
'title' => 'ACP_STYLES_INSTALL',
|
||||
'auth' => 'acl_a_styles',
|
||||
'cat' => 'ACP_STYLE_MANAGEMENT',
|
||||
),
|
||||
'edit' => array(
|
||||
'base' => 'acp_styles'
|
||||
'class' => 'acp',
|
||||
'title' => 'ACP_STYLES_EDIT',
|
||||
'auth' => 'acl_a_styles',
|
||||
'cat' => 'ACP_STYLE_MANAGEMENT',
|
||||
),
|
||||
'cache' => array(
|
||||
'base' => 'acp_styles'
|
||||
'class' => 'acp',
|
||||
'title' => 'ACP_STYLES_CACHE',
|
||||
'auth' => 'acl_a_styles',
|
||||
'cat' => 'ACP_STYLE_MANAGEMENT',
|
||||
),
|
||||
);
|
||||
|
||||
_add_modules($modules_to_install);
|
||||
|
||||
$sql = 'DELETE FROM ' . MODULES_TABLE . "
|
||||
WHERE module_basename = 'styles' AND module_mode = 'imageset'";
|
||||
WHERE (module_basename = 'styles' OR module_basename = 'acp_styles') AND (module_mode = 'imageset' OR module_mode = 'theme' OR module_mode = 'template')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
// Localise Global Announcements
|
||||
@ -2362,7 +2385,13 @@ function change_database_data(&$no_updates, $version)
|
||||
{
|
||||
set_config('teampage_memberships', '1');
|
||||
}
|
||||
|
||||
// Clear styles table and add prosilver entry
|
||||
_sql('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary);
|
||||
|
||||
$sql = 'INSERT INTO ' . STYLES_TABLE . " (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Group', 1, 'prosilver', 'kNg=', 0, '')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$no_updates = false;
|
||||
|
||||
break;
|
||||
|
@ -504,56 +504,6 @@ class install_update extends module
|
||||
// Add database update to log
|
||||
add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version);
|
||||
|
||||
// Refresh prosilver css data - this may cause some unhappy users, but
|
||||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_THEME_TABLE . "
|
||||
WHERE LOWER(theme_name) = 'prosilver'";
|
||||
$result = $db->sql_query($sql);
|
||||
$theme = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($theme)
|
||||
{
|
||||
$recache = (empty($theme['theme_data'])) ? true : false;
|
||||
$update_time = time();
|
||||
|
||||
// We test for stylesheet.css because it is faster and most likely the only file changed on common themes
|
||||
if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'))
|
||||
{
|
||||
$recache = true;
|
||||
$update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
|
||||
}
|
||||
else if (!$recache)
|
||||
{
|
||||
$last_change = $theme['theme_mtime'];
|
||||
$dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme");
|
||||
|
||||
if ($dir)
|
||||
{
|
||||
while (($entry = readdir($dir)) !== false)
|
||||
{
|
||||
if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}"))
|
||||
{
|
||||
$recache = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
if ($recache)
|
||||
{
|
||||
// Instead of re-caching here, we simply remove theme_data... HAR HAR HAR (think about a carribean pirate)
|
||||
$sql = 'UPDATE ' . STYLES_THEME_TABLE . " SET theme_data = ''
|
||||
WHERE theme_id = " . $theme['theme_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
$cache->destroy('sql', STYLES_THEME_TABLE);
|
||||
$cache->destroy('sql', STYLES_TABLE);
|
||||
}
|
||||
}
|
||||
|
||||
$db->sql_return_on_error(true);
|
||||
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
|
||||
$db->sql_return_on_error(false);
|
||||
@ -1694,9 +1644,9 @@ class install_update extends module
|
||||
$info['custom'] = array();
|
||||
/*
|
||||
// Get custom installed styles...
|
||||
$sql = 'SELECT template_name, template_path
|
||||
FROM ' . STYLES_TEMPLATE_TABLE . "
|
||||
WHERE LOWER(template_name) NOT IN ('subsilver2', 'prosilver')";
|
||||
$sql = 'SELECT style_name, style_path
|
||||
FROM ' . STYLES_TABLE . "
|
||||
WHERE LOWER(style_name) NOT IN ('subsilver2', 'prosilver')";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$templates = array();
|
||||
@ -1715,7 +1665,7 @@ class install_update extends module
|
||||
{
|
||||
foreach ($templates as $row)
|
||||
{
|
||||
$info['custom'][$filename][] = str_replace('/prosilver/', '/' . $row['template_path'] . '/', $filename);
|
||||
$info['custom'][$filename][] = str_replace('/prosilver/', '/' . $row['style_path'] . '/', $filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1086,15 +1086,15 @@ CREATE TABLE phpbb_styles (
|
||||
style_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
style_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
style_active INTEGER DEFAULT 1 NOT NULL,
|
||||
template_id INTEGER DEFAULT 0 NOT NULL,
|
||||
theme_id INTEGER DEFAULT 0 NOT NULL
|
||||
style_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL,
|
||||
style_parent_id INTEGER DEFAULT 0 NOT NULL,
|
||||
style_parent_tree BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);;
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);;
|
||||
CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);;
|
||||
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);;
|
||||
|
||||
CREATE GENERATOR phpbb_styles_gen;;
|
||||
SET GENERATOR phpbb_styles_gen TO 0;;
|
||||
@ -1107,55 +1107,6 @@ BEGIN
|
||||
END;;
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_template'
|
||||
CREATE TABLE phpbb_styles_template (
|
||||
template_id INTEGER NOT NULL,
|
||||
template_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
template_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
template_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL,
|
||||
template_inherits_id INTEGER DEFAULT 0 NOT NULL,
|
||||
template_inherit_path VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_styles_template ADD PRIMARY KEY (template_id);;
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(template_name);;
|
||||
|
||||
CREATE GENERATOR phpbb_styles_template_gen;;
|
||||
SET GENERATOR phpbb_styles_template_gen TO 0;;
|
||||
|
||||
CREATE TRIGGER t_phpbb_styles_template FOR phpbb_styles_template
|
||||
BEFORE INSERT
|
||||
AS
|
||||
BEGIN
|
||||
NEW.template_id = GEN_ID(phpbb_styles_template_gen, 1);
|
||||
END;;
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_theme'
|
||||
CREATE TABLE phpbb_styles_theme (
|
||||
theme_id INTEGER NOT NULL,
|
||||
theme_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
theme_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);;
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme(theme_name);;
|
||||
|
||||
CREATE GENERATOR phpbb_styles_theme_gen;;
|
||||
SET GENERATOR phpbb_styles_theme_gen TO 0;;
|
||||
|
||||
CREATE TRIGGER t_phpbb_styles_theme FOR phpbb_styles_theme
|
||||
BEFORE INSERT
|
||||
AS
|
||||
BEGIN
|
||||
NEW.theme_id = GEN_ID(phpbb_styles_theme_gen, 1);
|
||||
END;;
|
||||
|
||||
|
||||
# Table: 'phpbb_topics'
|
||||
CREATE TABLE phpbb_topics (
|
||||
topic_id INTEGER NOT NULL,
|
||||
|
@ -1322,8 +1322,10 @@ CREATE TABLE [phpbb_styles] (
|
||||
[style_name] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[style_active] [int] DEFAULT (1) NOT NULL ,
|
||||
[template_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[theme_id] [int] DEFAULT (0) NOT NULL
|
||||
[style_path] [varchar] (100) DEFAULT ('') NOT NULL ,
|
||||
[bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
|
||||
[style_parent_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[style_parent_tree] [varchar] (8000) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
@ -1337,59 +1339,6 @@ GO
|
||||
CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [template_id] ON [phpbb_styles]([template_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [theme_id] ON [phpbb_styles]([theme_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_template'
|
||||
*/
|
||||
CREATE TABLE [phpbb_styles_template] (
|
||||
[template_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[template_name] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
|
||||
[bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
|
||||
[template_inherits_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[template_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_theme'
|
||||
*/
|
||||
CREATE TABLE [phpbb_styles_theme] (
|
||||
[theme_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[theme_name] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[theme_path] [varchar] (100) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[theme_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_topics'
|
||||
|
@ -760,37 +760,12 @@ CREATE TABLE phpbb_styles (
|
||||
style_name blob NOT NULL,
|
||||
style_copyright blob NOT NULL,
|
||||
style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (style_id),
|
||||
UNIQUE style_name (style_name(255)),
|
||||
KEY template_id (template_id),
|
||||
KEY theme_id (theme_id)
|
||||
);
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_template'
|
||||
CREATE TABLE phpbb_styles_template (
|
||||
template_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
template_name blob NOT NULL,
|
||||
template_copyright blob NOT NULL,
|
||||
template_path varbinary(100) DEFAULT '' NOT NULL,
|
||||
style_path varbinary(100) DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL,
|
||||
template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_inherit_path varbinary(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (template_id),
|
||||
UNIQUE tmplte_nm (template_name(255))
|
||||
);
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_theme'
|
||||
CREATE TABLE phpbb_styles_theme (
|
||||
theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
theme_name blob NOT NULL,
|
||||
theme_copyright blob NOT NULL,
|
||||
theme_path varbinary(100) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (theme_id),
|
||||
UNIQUE theme_name (theme_name(255))
|
||||
style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
style_parent_tree blob NOT NULL,
|
||||
PRIMARY KEY (style_id),
|
||||
UNIQUE style_name (style_name(255))
|
||||
);
|
||||
|
||||
|
||||
|
@ -760,37 +760,12 @@ CREATE TABLE phpbb_styles (
|
||||
style_name varchar(255) DEFAULT '' NOT NULL,
|
||||
style_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (style_id),
|
||||
UNIQUE style_name (style_name),
|
||||
KEY template_id (template_id),
|
||||
KEY theme_id (theme_id)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_template'
|
||||
CREATE TABLE phpbb_styles_template (
|
||||
template_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
template_name varchar(255) DEFAULT '' NOT NULL,
|
||||
template_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
template_path varchar(100) DEFAULT '' NOT NULL,
|
||||
style_path varchar(100) DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
|
||||
template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_inherit_path varchar(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (template_id),
|
||||
UNIQUE tmplte_nm (template_name)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_theme'
|
||||
CREATE TABLE phpbb_styles_theme (
|
||||
theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
theme_name varchar(255) DEFAULT '' NOT NULL,
|
||||
theme_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
theme_path varchar(100) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (theme_id),
|
||||
UNIQUE theme_name (theme_name)
|
||||
style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
style_parent_tree text NOT NULL,
|
||||
PRIMARY KEY (style_id),
|
||||
UNIQUE style_name (style_name)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
||||
|
@ -1444,17 +1444,15 @@ CREATE TABLE phpbb_styles (
|
||||
style_name varchar2(765) DEFAULT '' ,
|
||||
style_copyright varchar2(765) DEFAULT '' ,
|
||||
style_active number(1) DEFAULT '1' NOT NULL,
|
||||
template_id number(8) DEFAULT '0' NOT NULL,
|
||||
theme_id number(8) DEFAULT '0' NOT NULL,
|
||||
style_path varchar2(100) DEFAULT '' ,
|
||||
bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
|
||||
style_parent_id number(4) DEFAULT '0' NOT NULL,
|
||||
style_parent_tree clob DEFAULT '' ,
|
||||
CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id),
|
||||
CONSTRAINT u_phpbb_style_name UNIQUE (style_name)
|
||||
)
|
||||
/
|
||||
|
||||
CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id)
|
||||
/
|
||||
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id)
|
||||
/
|
||||
|
||||
CREATE SEQUENCE phpbb_styles_seq
|
||||
/
|
||||
@ -1472,69 +1470,6 @@ END;
|
||||
/
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_template'
|
||||
*/
|
||||
CREATE TABLE phpbb_styles_template (
|
||||
template_id number(8) NOT NULL,
|
||||
template_name varchar2(765) DEFAULT '' ,
|
||||
template_copyright varchar2(765) DEFAULT '' ,
|
||||
template_path varchar2(100) DEFAULT '' ,
|
||||
bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
|
||||
template_inherits_id number(4) DEFAULT '0' NOT NULL,
|
||||
template_inherit_path varchar2(255) DEFAULT '' ,
|
||||
CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id),
|
||||
CONSTRAINT u_phpbb_tmplte_nm UNIQUE (template_name)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
CREATE SEQUENCE phpbb_styles_template_seq
|
||||
/
|
||||
|
||||
CREATE OR REPLACE TRIGGER t_phpbb_styles_template
|
||||
BEFORE INSERT ON phpbb_styles_template
|
||||
FOR EACH ROW WHEN (
|
||||
new.template_id IS NULL OR new.template_id = 0
|
||||
)
|
||||
BEGIN
|
||||
SELECT phpbb_styles_template_seq.nextval
|
||||
INTO :new.template_id
|
||||
FROM dual;
|
||||
END;
|
||||
/
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_theme'
|
||||
*/
|
||||
CREATE TABLE phpbb_styles_theme (
|
||||
theme_id number(8) NOT NULL,
|
||||
theme_name varchar2(765) DEFAULT '' ,
|
||||
theme_copyright varchar2(765) DEFAULT '' ,
|
||||
theme_path varchar2(100) DEFAULT '' ,
|
||||
CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id),
|
||||
CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name)
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
CREATE SEQUENCE phpbb_styles_theme_seq
|
||||
/
|
||||
|
||||
CREATE OR REPLACE TRIGGER t_phpbb_styles_theme
|
||||
BEFORE INSERT ON phpbb_styles_theme
|
||||
FOR EACH ROW WHEN (
|
||||
new.theme_id IS NULL OR new.theme_id = 0
|
||||
)
|
||||
BEGIN
|
||||
SELECT phpbb_styles_theme_seq.nextval
|
||||
INTO :new.theme_id
|
||||
FROM dual;
|
||||
END;
|
||||
/
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_topics'
|
||||
*/
|
||||
|
@ -994,47 +994,14 @@ CREATE TABLE phpbb_styles (
|
||||
style_name varchar(255) DEFAULT '' NOT NULL,
|
||||
style_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0),
|
||||
template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
|
||||
theme_id INT4 DEFAULT '0' NOT NULL CHECK (theme_id >= 0),
|
||||
style_path varchar(100) DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
|
||||
style_parent_id INT4 DEFAULT '0' NOT NULL CHECK (style_parent_id >= 0),
|
||||
style_parent_tree varchar(8000) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (style_id)
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
|
||||
CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id);
|
||||
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id);
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_template'
|
||||
*/
|
||||
CREATE SEQUENCE phpbb_styles_template_seq;
|
||||
|
||||
CREATE TABLE phpbb_styles_template (
|
||||
template_id INT4 DEFAULT nextval('phpbb_styles_template_seq'),
|
||||
template_name varchar(255) DEFAULT '' NOT NULL,
|
||||
template_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
template_path varchar(100) DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
|
||||
template_inherits_id INT4 DEFAULT '0' NOT NULL CHECK (template_inherits_id >= 0),
|
||||
template_inherit_path varchar(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (template_id)
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_theme'
|
||||
*/
|
||||
CREATE SEQUENCE phpbb_styles_theme_seq;
|
||||
|
||||
CREATE TABLE phpbb_styles_theme (
|
||||
theme_id INT4 DEFAULT nextval('phpbb_styles_theme_seq'),
|
||||
theme_name varchar(255) DEFAULT '' NOT NULL,
|
||||
theme_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
theme_path varchar(100) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (theme_id)
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
|
||||
|
||||
/*
|
||||
Table: 'phpbb_topics'
|
||||
|
@ -437,13 +437,7 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order)
|
||||
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', 10);
|
||||
|
||||
# -- phpbb_styles
|
||||
INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id) VALUES ('prosilver', '© phpBB Group', 1, 1, 1);
|
||||
|
||||
# -- phpbb_styles_template
|
||||
INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield) VALUES ('prosilver', '© phpBB Group', 'prosilver', 'lNg=');
|
||||
|
||||
# -- phpbb_styles_theme
|
||||
INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path) VALUES ('prosilver', '© phpBB Group', 'prosilver');
|
||||
INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Group', 1, 'prosilver', 'kNg=', 0, '');
|
||||
|
||||
# -- Forums
|
||||
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, '');
|
||||
|
@ -736,36 +736,13 @@ CREATE TABLE phpbb_styles (
|
||||
style_name varchar(255) NOT NULL DEFAULT '',
|
||||
style_copyright varchar(255) NOT NULL DEFAULT '',
|
||||
style_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
|
||||
template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
theme_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||
style_path varchar(100) NOT NULL DEFAULT '',
|
||||
bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
|
||||
style_parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
style_parent_tree text(65535) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
|
||||
CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id);
|
||||
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id);
|
||||
|
||||
# Table: 'phpbb_styles_template'
|
||||
CREATE TABLE phpbb_styles_template (
|
||||
template_id INTEGER PRIMARY KEY NOT NULL ,
|
||||
template_name varchar(255) NOT NULL DEFAULT '',
|
||||
template_copyright varchar(255) NOT NULL DEFAULT '',
|
||||
template_path varchar(100) NOT NULL DEFAULT '',
|
||||
bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
|
||||
template_inherits_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
template_inherit_path varchar(255) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
|
||||
|
||||
# Table: 'phpbb_styles_theme'
|
||||
CREATE TABLE phpbb_styles_theme (
|
||||
theme_id INTEGER PRIMARY KEY NOT NULL ,
|
||||
theme_name varchar(255) NOT NULL DEFAULT '',
|
||||
theme_copyright varchar(255) NOT NULL DEFAULT '',
|
||||
theme_path varchar(100) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
|
||||
|
||||
# Table: 'phpbb_topics'
|
||||
CREATE TABLE phpbb_topics (
|
||||
|
Loading…
x
Reference in New Issue
Block a user