From: Paul S. O. <ps...@us...> - 2001-11-30 23:15:56
|
Update of /cvsroot/phpbb/phpBB2/db/schemas In directory usw-pr-cvs1:/tmp/cvs-serv2462/db/schemas Modified Files: mysql_schema.sql mssql_schema.sql Log Message: Updated for improved use with ODBC setups + introduced a re-install feature ... the schema updates _only_ remove foreign key and drop table clauses Index: mysql_schema.sql =================================================================== RCS file: /cvsroot/phpbb/phpBB2/db/schemas/mysql_schema.sql,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** mysql_schema.sql 2001/11/24 17:17:32 1.4 --- mysql_schema.sql 2001/11/30 23:15:53 1.5 *************** *** 8,12 **** # Table structure for table 'phpbb_auth_access' # - DROP TABLE IF EXISTS phpbb_auth_access; CREATE TABLE phpbb_auth_access ( group_id mediumint(8) DEFAULT '0' NOT NULL, --- 8,11 ---- *************** *** 32,36 **** # Table structure for table 'phpbb_user_group' # - DROP TABLE IF EXISTS phpbb_user_group; CREATE TABLE phpbb_user_group ( group_id mediumint(8) DEFAULT '0' NOT NULL, --- 31,34 ---- *************** *** 44,48 **** # Table structure for table 'phpbb_groups' # - DROP TABLE IF EXISTS phpbb_groups; CREATE TABLE phpbb_groups ( group_id mediumint(8) NOT NULL auto_increment, --- 42,45 ---- *************** *** 61,65 **** # Table structure for table 'phpbb_banlist' # - DROP TABLE IF EXISTS phpbb_banlist; CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 58,61 ---- *************** *** 76,80 **** # Table structure for table 'phpbb_categories' # - DROP TABLE IF EXISTS phpbb_categories; CREATE TABLE phpbb_categories ( cat_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 72,75 ---- *************** *** 90,94 **** # Table structure for table 'phpbb_config' # - DROP TABLE IF EXISTS phpbb_config; CREATE TABLE phpbb_config ( config_name varchar(255) NOT NULL, --- 85,88 ---- *************** *** 102,106 **** # Table structure for table 'phpbb_disallow' # - DROP TABLE IF EXISTS phpbb_disallow; CREATE TABLE phpbb_disallow ( disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 96,99 ---- *************** *** 114,118 **** # Table structure for table 'phpbb_forum_prune' # - DROP TABLE IF EXISTS phpbb_forum_prune; CREATE TABLE phpbb_forum_prune ( prune_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 107,110 ---- *************** *** 129,133 **** # Table structure for table 'phpbb_forums' # - DROP TABLE IF EXISTS phpbb_forums; CREATE TABLE phpbb_forums ( forum_id smallint(5) UNSIGNED NOT NULL auto_increment, --- 121,124 ---- *************** *** 164,168 **** # Table structure for table 'phpbb_posts' # - DROP TABLE IF EXISTS phpbb_posts; CREATE TABLE phpbb_posts ( post_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 155,158 ---- *************** *** 191,195 **** # Table structure for table 'phpbb_posts_text' # - DROP TABLE IF EXISTS phpbb_posts_text; CREATE TABLE phpbb_posts_text ( post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, --- 181,184 ---- *************** *** 205,209 **** # Table structure for table 'phpbb_privmsgs' # - DROP TABLE IF EXISTS phpbb_privmsgs; CREATE TABLE phpbb_privmsgs ( privmsgs_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 194,197 ---- *************** *** 228,232 **** # Table structure for table 'phpbb_privmsgs_text' # - DROP TABLE IF EXISTS phpbb_privmsgs_text; CREATE TABLE phpbb_privmsgs_text ( privmsgs_text_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, --- 216,219 ---- *************** *** 241,245 **** # Table structure for table 'phpbb_ranks' # - DROP TABLE IF EXISTS phpbb_ranks; CREATE TABLE phpbb_ranks ( rank_id smallint(5) UNSIGNED NOT NULL auto_increment, --- 228,231 ---- *************** *** 257,261 **** # Table structure for table `phpbb_search_results` # - DROP TABLE IF EXISTS phpbb_search_results; CREATE TABLE phpbb_search_results ( search_id mediumint(8) UNSIGNED NOT NULL default '0', --- 243,246 ---- *************** *** 271,275 **** # Table structure for table `phpbb_search_wordlist` # - DROP TABLE IF EXISTS phpbb_search_wordlist; CREATE TABLE phpbb_search_wordlist ( word_text varchar(50) binary NOT NULL default '', --- 256,259 ---- *************** *** 284,288 **** # Table structure for table `phpbb_search_wordmatch` # - DROP TABLE IF EXISTS phpbb_search_wordmatch; CREATE TABLE phpbb_search_wordmatch ( post_id mediumint(8) UNSIGNED NOT NULL default '0', --- 268,271 ---- *************** *** 308,312 **** # look at any code ... ! # - DROP TABLE IF EXISTS phpbb_sessions; CREATE TABLE phpbb_sessions ( session_id char(32) DEFAULT '' NOT NULL, --- 291,294 ---- *************** *** 328,332 **** # Table structure for table 'phpbb_smilies' # - DROP TABLE IF EXISTS phpbb_smilies; CREATE TABLE phpbb_smilies ( smilies_id smallint(5) UNSIGNED NOT NULL auto_increment, --- 310,313 ---- *************** *** 342,346 **** # Table structure for table 'phpbb_themes' # - DROP TABLE IF EXISTS phpbb_themes; CREATE TABLE phpbb_themes ( themes_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 323,326 ---- *************** *** 395,399 **** # Table structure for table 'phpbb_themes_name' # - DROP TABLE IF EXISTS phpbb_themes_name; CREATE TABLE phpbb_themes_name ( themes_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL, --- 375,378 ---- *************** *** 436,440 **** # Table structure for table 'phpbb_topics' # - DROP TABLE IF EXISTS phpbb_topics; CREATE TABLE phpbb_topics ( topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 415,418 ---- *************** *** 461,465 **** # Table structure for table 'phpbb_topics_watch' # - DROP TABLE IF EXISTS phpbb_topics_watch; CREATE TABLE phpbb_topics_watch ( topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0', --- 439,442 ---- *************** *** 476,480 **** # Table structure for table 'phpbb_users' # - DROP TABLE IF EXISTS phpbb_users; CREATE TABLE phpbb_users ( user_id mediumint(8) NOT NULL auto_increment, --- 453,456 ---- *************** *** 530,534 **** # Table structure for table 'phpbb_vote_desc' # - DROP TABLE IF EXISTS phpbb_vote_desc; CREATE TABLE phpbb_vote_desc ( vote_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 506,509 ---- *************** *** 546,550 **** # Table structure for table 'phpbb_vote_results' # - DROP TABLE IF EXISTS phpbb_vote_results; CREATE TABLE phpbb_vote_results ( vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0', --- 521,524 ---- *************** *** 561,565 **** # Table structure for table 'phpbb_vote_voters' # - DROP TABLE IF EXISTS phpbb_vote_voters; CREATE TABLE phpbb_vote_voters ( vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0', --- 535,538 ---- *************** *** 576,580 **** # Table structure for table 'phpbb_words' # - DROP TABLE IF EXISTS phpbb_words; CREATE TABLE phpbb_words ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, --- 549,552 ---- Index: mssql_schema.sql =================================================================== RCS file: /cvsroot/phpbb/phpBB2/db/schemas/mssql_schema.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** mssql_schema.sql 2001/11/29 15:08:21 1.5 --- mssql_schema.sql 2001/11/30 23:15:53 1.6 *************** *** 10,149 **** GO - if exists (select * from dbo.sysobjects where id = object_id(N'[FK_phpbb_user_group_phpbb_groups]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1) - ALTER TABLE [phpbb_user_group] DROP CONSTRAINT FK_phpbb_user_group_phpbb_groups - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[FK_phpbb_posts_text_phpbb_posts]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1) - ALTER TABLE [phpbb_posts_text] DROP CONSTRAINT FK_phpbb_posts_text_phpbb_posts - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[FK_phpbb_privmsgs_text_phpbb_privmsgs]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1) - ALTER TABLE [phpbb_privmsgs_text] DROP CONSTRAINT FK_phpbb_privmsgs_text_phpbb_privmsgs - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[FK_phpbb_search_wordmatch_phpbb_search_wordlist]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1) - ALTER TABLE [phpbb_search_wordmatch] DROP CONSTRAINT FK_phpbb_search_wordmatch_phpbb_search_wordlist - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[FK_phpbb_themes_name_phpbb_themes]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1) - ALTER TABLE [phpbb_themes_name] DROP CONSTRAINT FK_phpbb_themes_name_phpbb_themes - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[FK_phpbb_topics_watch_phpbb_topics]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1) - ALTER TABLE [phpbb_topics_watch] DROP CONSTRAINT FK_phpbb_topics_watch_phpbb_topics - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_auth_access]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_auth_access] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_banlist]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_banlist] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_categories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_categories] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_config]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_config] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_disallow]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_disallow] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_forum_prune]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_forum_prune] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_forums]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_forums] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_groups]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_groups] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_posts]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_posts] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_posts_text]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_posts_text] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_privmsgs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_privmsgs] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_privmsgs_text]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_privmsgs_text] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_ranks]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_ranks] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_search_results]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_search_results] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_search_wordlist]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_search_wordlist] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_search_wordmatch]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_search_wordmatch] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_sessions]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_sessions] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_smilies]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_smilies] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_themes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_themes] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_themes_name]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_themes_name] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_topics]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_topics] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_topics_watch]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_topics_watch] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_user_group]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_user_group] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_users]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_users] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_vote_desc]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_vote_desc] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_vote_results]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_vote_results] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_vote_voters]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_vote_voters] - GO - - if exists (select * from dbo.sysobjects where id = object_id(N'[phpbb_words]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) - drop table [phpbb_words] - GO - CREATE TABLE [phpbb_auth_access] ( [group_id] [int] NULL , --- 10,13 ---- *************** *** 788,845 **** CREATE INDEX [IX_phpbb_vote_voters_1] ON [phpbb_vote_voters]([vote_user_id]) ON [PRIMARY] - GO - - ALTER TABLE [phpbb_posts_text] ADD - CONSTRAINT [FK_phpbb_posts_text_phpbb_posts] FOREIGN KEY - ( - [post_id] - ) REFERENCES [phpbb_posts] ( - [post_id] - ) - GO - - ALTER TABLE [phpbb_privmsgs_text] ADD - CONSTRAINT [FK_phpbb_privmsgs_text_phpbb_privmsgs] FOREIGN KEY - ( - [privmsgs_text_id] - ) REFERENCES [phpbb_privmsgs] ( - [privmsgs_id] - ) - GO - - ALTER TABLE [phpbb_search_wordmatch] ADD - CONSTRAINT [FK_phpbb_search_wordmatch_phpbb_search_wordlist] FOREIGN KEY - ( - [word_id] - ) REFERENCES [phpbb_search_wordlist] ( - [word_id] - ) - GO - - ALTER TABLE [phpbb_themes_name] ADD - CONSTRAINT [FK_phpbb_themes_name_phpbb_themes] FOREIGN KEY - ( - [themes_id] - ) REFERENCES [phpbb_themes] ( - [themes_id] - ) - GO - - ALTER TABLE [phpbb_topics_watch] ADD - CONSTRAINT [FK_phpbb_topics_watch_phpbb_topics] FOREIGN KEY - ( - [topic_id] - ) REFERENCES [phpbb_topics] ( - [topic_id] - ) - GO - - ALTER TABLE [phpbb_user_group] ADD - CONSTRAINT [FK_phpbb_user_group_phpbb_groups] FOREIGN KEY - ( - [group_id] - ) REFERENCES [phpbb_groups] ( - [group_id] - ) GO --- 652,655 ---- |