aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/schemas
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-07-31 20:27:39 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-07-31 20:27:39 +0000
commit30f81737096afe8c5910d6f494654d08950f4fcc (patch)
treec03b8ad55f914e68065d1cbe8ec1426f2f5cf252 /phpBB/install/schemas
parentcef5720962ae88bae37eb2edc942b70400b2ff37 (diff)
downloadforums-30f81737096afe8c5910d6f494654d08950f4fcc.tar
forums-30f81737096afe8c5910d6f494654d08950f4fcc.tar.gz
forums-30f81737096afe8c5910d6f494654d08950f4fcc.tar.bz2
forums-30f81737096afe8c5910d6f494654d08950f4fcc.tar.xz
forums-30f81737096afe8c5910d6f494654d08950f4fcc.zip
- found a bug, it caused MSSQL not being able to use templates stored in the DB since the first beta. removing pointless auto_increment
git-svn-id: file:///svn/phpbb/trunk@7990 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/schemas')
-rw-r--r--phpBB/install/schemas/firebird_schema.sql13
-rw-r--r--phpBB/install/schemas/mssql_schema.sql2
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql2
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql2
-rw-r--r--phpBB/install/schemas/oracle_schema.sql18
-rw-r--r--phpBB/install/schemas/postgres_schema.sql4
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql2
7 files changed, 7 insertions, 36 deletions
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index d0f9cf88d1..38ef13c412 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -1093,7 +1093,7 @@ END;;
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
- template_id INTEGER NOT NULL,
+ 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,
@@ -1103,17 +1103,6 @@ CREATE TABLE phpbb_styles_template_data (
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);;
-CREATE GENERATOR phpbb_styles_template_data_gen;;
-SET GENERATOR phpbb_styles_template_data_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_styles_template_data FOR phpbb_styles_template_data
-BEFORE INSERT
-AS
-BEGIN
- NEW.template_id = GEN_ID(phpbb_styles_template_data_gen, 1);
-END;;
-
-
# Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme (
theme_id INTEGER NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 7dd9c4e924..37e8f66b2a 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -1309,7 +1309,7 @@ GO
Table: 'phpbb_styles_template_data'
*/
CREATE TABLE [phpbb_styles_template_data] (
- [template_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [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 ,
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index e2dc0718e7..a1450cacee 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -743,7 +743,7 @@ CREATE TABLE phpbb_styles_template (
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
- template_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ template_id smallint(4) 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,
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 022c3ecbfe..4cee662be6 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -743,7 +743,7 @@ CREATE TABLE phpbb_styles_template (
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
- template_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ template_id smallint(4) 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,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 7dad10dd67..aabc00f0e2 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1453,7 +1453,7 @@ END;
Table: 'phpbb_styles_template_data'
*/
CREATE TABLE phpbb_styles_template_data (
- template_id number(4) NOT NULL,
+ template_id number(4) DEFAULT '0' NOT NULL,
template_filename varchar2(100) DEFAULT '' ,
template_included clob DEFAULT '' ,
template_mtime number(11) DEFAULT '0' NOT NULL,
@@ -1466,22 +1466,6 @@ CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (templ
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename)
/
-CREATE SEQUENCE phpbb_styles_template_data_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_styles_template_data
-BEFORE INSERT ON phpbb_styles_template_data
-FOR EACH ROW WHEN (
- new.template_id IS NULL OR new.template_id = 0
-)
-BEGIN
- SELECT phpbb_styles_template_data_seq.nextval
- INTO :new.template_id
- FROM dual;
-END;
-/
-
-
/*
Table: 'phpbb_styles_theme'
*/
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index f9b0557d8a..5d4c6f477b 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -977,10 +977,8 @@ CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (te
/*
Table: 'phpbb_styles_template_data'
*/
-CREATE SEQUENCE phpbb_styles_template_data_seq;
-
CREATE TABLE phpbb_styles_template_data (
- template_id INT2 DEFAULT nextval('phpbb_styles_template_data_seq'),
+ template_id INT2 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),
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 90847e9d31..546cfb0321 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -717,7 +717,7 @@ CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (te
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
- template_id INTEGER PRIMARY KEY NOT NULL ,
+ 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',