1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 21:54:00 +02:00

[feature/remove-imagesets] Changing database structure

Removing imagesets. Changing database structure

PHPBB3-10336
This commit is contained in:
Vjacheslav Trushkin
2011-09-03 18:55:30 +03:00
parent 929c13a52b
commit 33adfd633b
12 changed files with 20 additions and 460 deletions

View File

@@ -1432,7 +1432,6 @@ CREATE TABLE phpbb_styles (
style_active number(1) DEFAULT '1' NOT NULL,
template_id number(8) DEFAULT '0' NOT NULL,
theme_id number(8) DEFAULT '0' NOT NULL,
imageset_id number(8) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id),
CONSTRAINT u_phpbb_style_name UNIQUE (style_name)
)
@@ -1442,8 +1441,6 @@ CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id)
/
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id)
/
CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id)
/
CREATE SEQUENCE phpbb_styles_seq
/
@@ -1545,70 +1542,6 @@ END;
/
/*
Table: 'phpbb_styles_imageset'
*/
CREATE TABLE phpbb_styles_imageset (
imageset_id number(8) NOT NULL,
imageset_name varchar2(765) DEFAULT '' ,
imageset_copyright varchar2(765) DEFAULT '' ,
imageset_path varchar2(100) DEFAULT '' ,
CONSTRAINT pk_phpbb_styles_imageset PRIMARY KEY (imageset_id),
CONSTRAINT u_phpbb_imgset_nm UNIQUE (imageset_name)
)
/
CREATE SEQUENCE phpbb_styles_imageset_seq
/
CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset
BEFORE INSERT ON phpbb_styles_imageset
FOR EACH ROW WHEN (
new.imageset_id IS NULL OR new.imageset_id = 0
)
BEGIN
SELECT phpbb_styles_imageset_seq.nextval
INTO :new.imageset_id
FROM dual;
END;
/
/*
Table: 'phpbb_styles_imageset_data'
*/
CREATE TABLE phpbb_styles_imageset_data (
image_id number(8) NOT NULL,
image_name varchar2(200) DEFAULT '' ,
image_filename varchar2(200) DEFAULT '' ,
image_lang varchar2(30) DEFAULT '' ,
image_height number(4) DEFAULT '0' NOT NULL,
image_width number(4) DEFAULT '0' NOT NULL,
imageset_id number(8) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id)
)
/
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id)
/
CREATE SEQUENCE phpbb_styles_imageset_data_seq
/
CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset_data
BEFORE INSERT ON phpbb_styles_imageset_data
FOR EACH ROW WHEN (
new.image_id IS NULL OR new.image_id = 0
)
BEGIN
SELECT phpbb_styles_imageset_data_seq.nextval
INTO :new.image_id
FROM dual;
END;
/
/*
Table: 'phpbb_topics'
*/