mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[feature/remove-db-styles] Update database schemas.
Removes: * styles_template_data table * template_storedb on styles_template table * On styles_theme table: - theme_storedb - theme_mtime - theme_data PHPBB3-9741
This commit is contained in:
parent
934a9da313
commit
270cd839a6
@ -1657,7 +1657,6 @@ function get_schema_struct()
|
||||
'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', ''),
|
||||
),
|
||||
@ -1667,29 +1666,12 @@ function get_schema_struct()
|
||||
),
|
||||
);
|
||||
|
||||
$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(
|
||||
|
@ -1104,7 +1104,6 @@ CREATE TABLE phpbb_styles_template (
|
||||
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_storedb INTEGER DEFAULT 0 NOT NULL,
|
||||
template_inherits_id INTEGER DEFAULT 0 NOT NULL,
|
||||
template_inherit_path VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||
);;
|
||||
@ -1124,27 +1123,12 @@ BEGIN
|
||||
END;;
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_template_data'
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id INTEGER DEFAULT 0 NOT NULL,
|
||||
template_filename VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
template_included BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
template_mtime INTEGER DEFAULT 0 NOT NULL,
|
||||
template_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data(template_id);;
|
||||
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data(template_filename);;
|
||||
|
||||
# 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,
|
||||
theme_storedb INTEGER DEFAULT 0 NOT NULL,
|
||||
theme_mtime INTEGER DEFAULT 0 NOT NULL,
|
||||
theme_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
|
||||
theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);;
|
||||
|
@ -1337,7 +1337,6 @@ CREATE TABLE [phpbb_styles_template] (
|
||||
[template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
|
||||
[bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
|
||||
[template_storedb] [int] DEFAULT (0) NOT NULL ,
|
||||
[template_inherits_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
@ -1354,25 +1353,6 @@ CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_template_data'
|
||||
*/
|
||||
CREATE TABLE [phpbb_styles_template_data] (
|
||||
[template_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
|
||||
[template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
|
||||
[template_mtime] [int] DEFAULT (0) NOT NULL ,
|
||||
[template_data] [text] DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [tfn] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_theme'
|
||||
*/
|
||||
@ -1380,11 +1360,8 @@ 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 ,
|
||||
[theme_storedb] [int] DEFAULT (0) NOT NULL ,
|
||||
[theme_mtime] [int] DEFAULT (0) NOT NULL ,
|
||||
[theme_data] [text] DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
[theme_path] [varchar] (100) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
|
||||
|
@ -766,7 +766,6 @@ CREATE TABLE phpbb_styles_template (
|
||||
template_copyright blob NOT NULL,
|
||||
template_path varbinary(100) DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL,
|
||||
template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_inherit_path varbinary(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (template_id),
|
||||
@ -774,27 +773,12 @@ CREATE TABLE phpbb_styles_template (
|
||||
);
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_template_data'
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_filename varbinary(100) DEFAULT '' NOT NULL,
|
||||
template_included blob NOT NULL,
|
||||
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_data mediumblob NOT NULL,
|
||||
KEY tid (template_id),
|
||||
KEY tfn (template_filename)
|
||||
);
|
||||
|
||||
|
||||
# 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,
|
||||
theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
theme_data mediumblob NOT NULL,
|
||||
PRIMARY KEY (theme_id),
|
||||
UNIQUE theme_name (theme_name(255))
|
||||
);
|
||||
|
@ -766,7 +766,6 @@ CREATE TABLE phpbb_styles_template (
|
||||
template_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
template_path varchar(100) DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
|
||||
template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_inherit_path varchar(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (template_id),
|
||||
@ -774,27 +773,12 @@ CREATE TABLE phpbb_styles_template (
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_template_data'
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_filename varchar(100) DEFAULT '' NOT NULL,
|
||||
template_included text NOT NULL,
|
||||
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_data mediumtext NOT NULL,
|
||||
KEY tid (template_id),
|
||||
KEY tfn (template_filename)
|
||||
) 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,
|
||||
theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
theme_data mediumtext NOT NULL,
|
||||
PRIMARY KEY (theme_id),
|
||||
UNIQUE theme_name (theme_name)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
@ -1467,7 +1467,6 @@ CREATE TABLE phpbb_styles_template (
|
||||
template_copyright varchar2(765) DEFAULT '' ,
|
||||
template_path varchar2(100) DEFAULT '' ,
|
||||
bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
|
||||
template_storedb number(1) DEFAULT '0' 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),
|
||||
@ -1492,23 +1491,6 @@ END;
|
||||
/
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_template_data'
|
||||
*/
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id number(8) DEFAULT '0' NOT NULL,
|
||||
template_filename varchar2(100) DEFAULT '' ,
|
||||
template_included clob DEFAULT '' ,
|
||||
template_mtime number(11) DEFAULT '0' NOT NULL,
|
||||
template_data clob DEFAULT ''
|
||||
)
|
||||
/
|
||||
|
||||
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id)
|
||||
/
|
||||
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename)
|
||||
/
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_theme'
|
||||
*/
|
||||
@ -1517,9 +1499,6 @@ CREATE TABLE phpbb_styles_theme (
|
||||
theme_name varchar2(765) DEFAULT '' ,
|
||||
theme_copyright varchar2(765) DEFAULT '' ,
|
||||
theme_path varchar2(100) DEFAULT '' ,
|
||||
theme_storedb number(1) DEFAULT '0' NOT NULL,
|
||||
theme_mtime number(11) DEFAULT '0' NOT NULL,
|
||||
theme_data clob DEFAULT '' ,
|
||||
CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id),
|
||||
CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name)
|
||||
)
|
||||
|
@ -1001,7 +1001,6 @@ CREATE TABLE phpbb_styles_template (
|
||||
template_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
template_path varchar(100) DEFAULT '' NOT NULL,
|
||||
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
|
||||
template_storedb INT2 DEFAULT '0' NOT NULL CHECK (template_storedb >= 0),
|
||||
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)
|
||||
@ -1009,20 +1008,6 @@ CREATE TABLE phpbb_styles_template (
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_template_data'
|
||||
*/
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
|
||||
template_filename varchar(100) DEFAULT '' NOT NULL,
|
||||
template_included varchar(8000) DEFAULT '' NOT NULL,
|
||||
template_mtime INT4 DEFAULT '0' NOT NULL CHECK (template_mtime >= 0),
|
||||
template_data TEXT DEFAULT '' NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
|
||||
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_theme'
|
||||
*/
|
||||
@ -1033,9 +1018,6 @@ CREATE TABLE phpbb_styles_theme (
|
||||
theme_name varchar(255) DEFAULT '' NOT NULL,
|
||||
theme_copyright varchar(255) DEFAULT '' NOT NULL,
|
||||
theme_path varchar(100) DEFAULT '' NOT NULL,
|
||||
theme_storedb INT2 DEFAULT '0' NOT NULL CHECK (theme_storedb >= 0),
|
||||
theme_mtime INT4 DEFAULT '0' NOT NULL CHECK (theme_mtime >= 0),
|
||||
theme_data TEXT DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (theme_id)
|
||||
);
|
||||
|
||||
|
@ -440,7 +440,7 @@ INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id
|
||||
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, theme_storedb, theme_data) VALUES ('prosilver', '© phpBB Group', 'prosilver', 1, '');
|
||||
INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path) VALUES ('prosilver', '© phpBB Group', 'prosilver');
|
||||
|
||||
# -- 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, '');
|
||||
|
@ -741,34 +741,18 @@ CREATE TABLE phpbb_styles_template (
|
||||
template_copyright varchar(255) NOT NULL DEFAULT '',
|
||||
template_path varchar(100) NOT NULL DEFAULT '',
|
||||
bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
|
||||
template_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
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_template_data'
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
template_filename varchar(100) NOT NULL DEFAULT '',
|
||||
template_included text(65535) NOT NULL DEFAULT '',
|
||||
template_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
template_data mediumtext(16777215) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
|
||||
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
|
||||
|
||||
# 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 '',
|
||||
theme_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
theme_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
theme_data mediumtext(16777215) NOT NULL DEFAULT ''
|
||||
theme_path varchar(100) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user