From: Lawrence A. <la...@us...> - 2002-01-08 16:55:50
|
Update of /cvsroot/pn-modules/modules_development/phpWiki/schemas In directory usw-pr-cvs1:/tmp/cvs-serv19798/phpWiki/schemas Modified Files: .htaccess minisql.sql mysql.sql psql.sql Removed Files: schema.minisql schema.mysql schema.psql Log Message: Changes from phpWiki 1.3.2 Index: .htaccess =================================================================== RCS file: /cvsroot/pn-modules/modules_development/phpWiki/schemas/.htaccess,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** .htaccess 2001/12/14 17:09:03 1.1.1.2 --- .htaccess 2002/01/08 16:55:46 1.2 *************** *** 1,3 **** ! # $Id$ ! order allow,deny ! Deny from all --- 1,3 ---- ! # $Id$ ! order allow,deny ! Deny from all Index: minisql.sql =================================================================== RCS file: /cvsroot/pn-modules/modules_development/phpWiki/schemas/minisql.sql,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** minisql.sql 2001/12/14 17:09:04 1.1.1.1 --- minisql.sql 2002/01/08 16:55:46 1.2 *************** *** 1,109 **** ! # $Id$ ! ! drop table wiki\g ! drop table wikipages\g ! drop table archive\g ! drop table archivepages\g ! ! drop table wikilinks\g ! drop table hottopics\g ! drop table hitcount\g ! drop table wikiscore\g ! ! # metadata about the page ! ! CREATE TABLE wiki ( ! pagename CHAR(100) NOT NULL, ! version INT NOT NULL, ! flags INT NOT NULL, ! author CHAR(100), ! lastmodified INT NOT NULL, ! created INT NOT NULL, ! refs TEXT(100) ! ) ! \g ! ! CREATE UNIQUE INDEX wiki_index ON wiki (pagename) ! \g ! ! # archive for page metadata ! ! CREATE TABLE archive ( ! pagename CHAR(100) NOT NULL, ! version INT NOT NULL, ! flags INT NOT NULL, ! author CHAR(100), ! lastmodified INT NOT NULL, ! created INT NOT NULL, ! refs TEXT(100) ! ) ! \g ! ! CREATE UNIQUE INDEX archive_index ON archive (pagename, version) ! \g ! ! ! # table for the pages themselves... stored in lines ! ! CREATE TABLE wikipages ( ! pagename CHAR(100) NOT NULL, ! lineno INT NOT NULL, ! line CHAR(128) ! ) ! \g ! ! CREATE UNIQUE INDEX wp_idx ON wikipages (pagename, lineno) ! \g ! ! ! # archive of page lines ! ! CREATE TABLE archivepages ( ! pagename CHAR(100) NOT NULL, ! lineno INT NOT NULL, ! line CHAR(128) ! ) ! \g ! ! CREATE UNIQUE INDEX ap_idx ON archivepages (pagename, lineno) ! \g ! ! ! ! # tables below are not yet used ! ! CREATE TABLE wikilinks ( ! frompage CHAR(100) NOT NULL, ! topage CHAR(100) NOT NULL ! ) ! \g ! ! CREATE UNIQUE INDEX wikilinks_index ON wikilinks (frompage, topage) ! \g ! ! CREATE TABLE hottopics ( ! pagename CHAR(100) NOT NULL, ! lastmodified INT NOT NULL ! ) ! \g ! ! CREATE UNIQUE INDEX hottopics_index ON hottopics (pagename, lastmodified) ! \g ! ! CREATE TABLE hitcount ( ! pagename CHAR(100) NOT NULL, ! hits INT NOT NULL ! ) ! \g ! ! CREATE UNIQUE INDEX hitcount_index ON hitcount (pagename) ! \g ! ! CREATE TABLE wikiscore ( ! pagename CHAR(100) NOT NULL, ! score INT NOT NULL ! ) ! \g ! ! CREATE UNIQUE INDEX hitcount_index ON wikiscore (pagename) ! \g --- 1,109 ---- ! # $Id$ ! ! drop table wiki\g ! drop table wikipages\g ! drop table archive\g ! drop table archivepages\g ! ! drop table wikilinks\g ! drop table hottopics\g ! drop table hitcount\g ! drop table wikiscore\g ! ! # metadata about the page ! ! CREATE TABLE wiki ( ! pagename CHAR(100) NOT NULL, ! version INT NOT NULL, ! flags INT NOT NULL, ! author CHAR(100), ! lastmodified INT NOT NULL, ! created INT NOT NULL, ! refs TEXT(100) ! ) ! \g ! ! CREATE UNIQUE INDEX wiki_index ON wiki (pagename) ! \g ! ! # archive for page metadata ! ! CREATE TABLE archive ( ! pagename CHAR(100) NOT NULL, ! version INT NOT NULL, ! flags INT NOT NULL, ! author CHAR(100), ! lastmodified INT NOT NULL, ! created INT NOT NULL, ! refs TEXT(100) ! ) ! \g ! ! CREATE UNIQUE INDEX archive_index ON archive (pagename, version) ! \g ! ! ! # table for the pages themselves... stored in lines ! ! CREATE TABLE wikipages ( ! pagename CHAR(100) NOT NULL, ! lineno INT NOT NULL, ! line CHAR(128) ! ) ! \g ! ! CREATE UNIQUE INDEX wp_idx ON wikipages (pagename, lineno) ! \g ! ! ! # archive of page lines ! ! CREATE TABLE archivepages ( ! pagename CHAR(100) NOT NULL, ! lineno INT NOT NULL, ! line CHAR(128) ! ) ! \g ! ! CREATE UNIQUE INDEX ap_idx ON archivepages (pagename, lineno) ! \g ! ! ! ! # tables below are not yet used ! ! CREATE TABLE wikilinks ( ! frompage CHAR(100) NOT NULL, ! topage CHAR(100) NOT NULL ! ) ! \g ! ! CREATE UNIQUE INDEX wikilinks_index ON wikilinks (frompage, topage) ! \g ! ! CREATE TABLE hottopics ( ! pagename CHAR(100) NOT NULL, ! lastmodified INT NOT NULL ! ) ! \g ! ! CREATE UNIQUE INDEX hottopics_index ON hottopics (pagename, lastmodified) ! \g ! ! CREATE TABLE hitcount ( ! pagename CHAR(100) NOT NULL, ! hits INT NOT NULL ! ) ! \g ! ! CREATE UNIQUE INDEX hitcount_index ON hitcount (pagename) ! \g ! ! CREATE TABLE wikiscore ( ! pagename CHAR(100) NOT NULL, ! score INT NOT NULL ! ) ! \g ! ! CREATE UNIQUE INDEX hitcount_index ON wikiscore (pagename) ! \g Index: mysql.sql =================================================================== RCS file: /cvsroot/pn-modules/modules_development/phpWiki/schemas/mysql.sql,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mysql.sql 2001/12/14 17:09:04 1.1.1.1 --- mysql.sql 2002/01/08 16:55:46 1.2 *************** *** 1,47 **** ! -- $Id$ ! ! drop table if exists page; ! CREATE TABLE page ( ! id INT NOT NULL, ! pagename VARCHAR(100) BINARY NOT NULL, ! hits INT NOT NULL DEFAULT 0, ! pagedata MEDIUMTEXT NOT NULL DEFAULT '', ! PRIMARY KEY (id), ! UNIQUE KEY (pagename) ! ); ! ! drop table if exists version; ! CREATE TABLE version ( ! id INT NOT NULL, ! version INT NOT NULL, ! mtime INT NOT NULL, ! minor_edit TINYINT DEFAULT 0, ! content MEDIUMTEXT NOT NULL DEFAULT '', ! versiondata MEDIUMTEXT NOT NULL DEFAULT '', ! PRIMARY KEY (id,version), ! INDEX (mtime) ! ); ! ! drop table if exists recent; ! CREATE TABLE recent ( ! id INT NOT NULL, ! latestversion INT, ! latestmajor INT, ! latestminor INT, ! PRIMARY KEY (id) ! ); ! ! drop table if exists nonempty; ! CREATE TABLE nonempty ( ! id INT NOT NULL, ! PRIMARY KEY (id) ! ); ! ! drop table if exists link; ! CREATE TABLE link ( ! linkfrom INT NOT NULL, ! linkto INT NOT NULL, ! INDEX (linkfrom), ! INDEX (linkto) ! ); ! --- 1,47 ---- ! -- $Id$ ! ! drop table if exists page; ! CREATE TABLE page ( ! id INT NOT NULL, ! pagename VARCHAR(100) BINARY NOT NULL, ! hits INT NOT NULL DEFAULT 0, ! pagedata MEDIUMTEXT NOT NULL DEFAULT '', ! PRIMARY KEY (id), ! UNIQUE KEY (pagename) ! ); ! ! drop table if exists version; ! CREATE TABLE version ( ! id INT NOT NULL, ! version INT NOT NULL, ! mtime INT NOT NULL, ! minor_edit TINYINT DEFAULT 0, ! content MEDIUMTEXT NOT NULL DEFAULT '', ! versiondata MEDIUMTEXT NOT NULL DEFAULT '', ! PRIMARY KEY (id,version), ! INDEX (mtime) ! ); ! ! drop table if exists recent; ! CREATE TABLE recent ( ! id INT NOT NULL, ! latestversion INT, ! latestmajor INT, ! latestminor INT, ! PRIMARY KEY (id) ! ); ! ! drop table if exists nonempty; ! CREATE TABLE nonempty ( ! id INT NOT NULL, ! PRIMARY KEY (id) ! ); ! ! drop table if exists link; ! CREATE TABLE link ( ! linkfrom INT NOT NULL, ! linkto INT NOT NULL, ! INDEX (linkfrom), ! INDEX (linkto) ! ); ! Index: psql.sql =================================================================== RCS file: /cvsroot/pn-modules/modules_development/phpWiki/schemas/psql.sql,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** psql.sql 2001/12/21 12:41:13 1.1.1.2 --- psql.sql 2002/01/08 16:55:46 1.2 *************** *** 1,126 **** ! -- $Id$ ! ! \set QUIET ! ! ! --================================================================ ! -- Prefix for table names. ! -- ! -- You should set this to the same value you specify for ! -- $DBParams['prefix'] in index.php. ! ! \set prefix '' ! ! --================================================================ ! -- Which postgres user gets access to the tables? ! -- ! -- You should set this to the name of the postgres ! -- user who will be accessing the tables. ! -- ! -- Commonly, connections from php are made under ! -- the user name of 'nobody', 'apache' or 'www'. ! ! \set httpd_user 'apache' ! ! --================================================================ ! -- ! -- Don't modify below this point unless you know what you are doing. ! -- ! --================================================================ ! ! \set qprefix '\'' :prefix '\'' ! \set qhttp_user '\'' :httpd_user '\'' ! \echo Initializing PhpWiki tables with: ! \echo ' prefix = ' :qprefix ! \echo ' httpd_user = ' :qhttp_user ! \echo ! \echo 'Expect some \'Relation \'*\' does not exists\' errors unless you are' ! \echo 'overwriting existing tables.' ! ! \set page_tbl :prefix 'page' ! \set page_id :prefix 'page_id' ! \set page_nm :prefix 'page_nm' ! ! \set version_tbl :prefix 'version' ! \set vers_id :prefix 'vers_id' ! \set vers_mtime :prefix 'vers_mtime' ! ! \set recent_tbl :prefix 'recent' ! \set recent_id :prefix 'recent_id' ! ! \set nonempty_tbl :prefix 'nonempty' ! \set nonmt_id :prefix 'nonmt_id' ! ! \set link_tbl :prefix 'link' ! \set link_from :prefix 'link_from' ! \set link_to :prefix 'link_to' ! ! \echo Dropping :page_tbl ! DROP TABLE :page_tbl; ! \echo Creating :page_tbl ! CREATE TABLE :page_tbl ( ! id INT NOT NULL, ! pagename VARCHAR(100) NOT NULL, ! hits INT NOT NULL DEFAULT 0, ! pagedata TEXT NOT NULL DEFAULT '' ! ); ! CREATE UNIQUE INDEX :page_id ! ON :page_tbl (id); ! CREATE UNIQUE INDEX :page_nm ! ON :page_tbl (pagename); ! ! \echo Dropping :version_tbl ! DROP TABLE :version_tbl; ! \echo Creating :version_tbl ! CREATE TABLE :version_tbl ( ! id INT NOT NULL, ! version INT NOT NULL, ! mtime INT NOT NULL, ! --FIXME: should use boolean, but that returns 't' or 'f'. not 0 or 1. ! minor_edit INT2 DEFAULT 0, ! content TEXT NOT NULL DEFAULT '', ! versiondata TEXT NOT NULL DEFAULT '' ! ); ! CREATE UNIQUE INDEX :vers_id ! ON :version_tbl (id,version); ! CREATE INDEX :vers_mtime ! ON :version_tbl (mtime); ! ! \echo Dropping :recent_tbl ! DROP TABLE :recent_tbl; ! \echo Creating :recent_tbl ! CREATE TABLE :recent_tbl ( ! id INT NOT NULL, ! latestversion INT, ! latestmajor INT, ! latestminor INT ! ); ! CREATE UNIQUE INDEX :recent_id ! ON :recent_tbl (id); ! ! ! \echo Dropping :nonempty_tbl ! DROP TABLE :nonempty_tbl; ! \echo Creating :nonempty_tbl ! CREATE TABLE :nonempty_tbl ( ! id INT NOT NULL ! ); ! CREATE UNIQUE INDEX :nonmt_id ! ON :nonempty_tbl (id); ! ! \echo Dropping :link_tbl ! DROP TABLE :link_tbl; ! \echo Creating :link_tbl ! CREATE TABLE :link_tbl ( ! linkfrom INT NOT NULL, ! linkto INT NOT NULL ! ); ! CREATE INDEX :link_from ON :link_tbl (linkfrom); ! CREATE INDEX :link_to ON :link_tbl (linkto); ! ! ! GRANT ALL ON :page_tbl TO :httpd_user; ! GRANT ALL ON :version_tbl TO :httpd_user; ! GRANT ALL ON :recent_tbl TO :httpd_user; ! GRANT ALL ON :nonempty_tbl TO :httpd_user; ! GRANT ALL ON :link_tbl TO :httpd_user; --- 1,126 ---- ! -- $Id$ ! ! \set QUIET ! ! ! --================================================================ ! -- Prefix for table names. ! -- ! -- You should set this to the same value you specify for ! -- $DBParams['prefix'] in index.php. ! ! \set prefix '' ! ! --================================================================ ! -- Which postgres user gets access to the tables? ! -- ! -- You should set this to the name of the postgres ! -- user who will be accessing the tables. ! -- ! -- Commonly, connections from php are made under ! -- the user name of 'nobody', 'apache' or 'www'. ! ! \set httpd_user 'apache' ! ! --================================================================ ! -- ! -- Don't modify below this point unless you know what you are doing. ! -- ! --================================================================ ! ! \set qprefix '\'' :prefix '\'' ! \set qhttp_user '\'' :httpd_user '\'' ! \echo Initializing PhpWiki tables with: ! \echo ' prefix = ' :qprefix ! \echo ' httpd_user = ' :qhttp_user ! \echo ! \echo 'Expect some \'Relation \'*\' does not exists\' errors unless you are' ! \echo 'overwriting existing tables.' ! ! \set page_tbl :prefix 'page' ! \set page_id :prefix 'page_id' ! \set page_nm :prefix 'page_nm' ! ! \set version_tbl :prefix 'version' ! \set vers_id :prefix 'vers_id' ! \set vers_mtime :prefix 'vers_mtime' ! ! \set recent_tbl :prefix 'recent' ! \set recent_id :prefix 'recent_id' ! ! \set nonempty_tbl :prefix 'nonempty' ! \set nonmt_id :prefix 'nonmt_id' ! ! \set link_tbl :prefix 'link' ! \set link_from :prefix 'link_from' ! \set link_to :prefix 'link_to' ! ! \echo Dropping :page_tbl ! DROP TABLE :page_tbl; ! \echo Creating :page_tbl ! CREATE TABLE :page_tbl ( ! id INT NOT NULL, ! pagename VARCHAR(100) NOT NULL, ! hits INT NOT NULL DEFAULT 0, ! pagedata TEXT NOT NULL DEFAULT '' ! ); ! CREATE UNIQUE INDEX :page_id ! ON :page_tbl (id); ! CREATE UNIQUE INDEX :page_nm ! ON :page_tbl (pagename); ! ! \echo Dropping :version_tbl ! DROP TABLE :version_tbl; ! \echo Creating :version_tbl ! CREATE TABLE :version_tbl ( ! id INT NOT NULL, ! version INT NOT NULL, ! mtime INT NOT NULL, ! --FIXME: should use boolean, but that returns 't' or 'f'. not 0 or 1. ! minor_edit INT2 DEFAULT 0, ! content TEXT NOT NULL DEFAULT '', ! versiondata TEXT NOT NULL DEFAULT '' ! ); ! CREATE UNIQUE INDEX :vers_id ! ON :version_tbl (id,version); ! CREATE INDEX :vers_mtime ! ON :version_tbl (mtime); ! ! \echo Dropping :recent_tbl ! DROP TABLE :recent_tbl; ! \echo Creating :recent_tbl ! CREATE TABLE :recent_tbl ( ! id INT NOT NULL, ! latestversion INT, ! latestmajor INT, ! latestminor INT ! ); ! CREATE UNIQUE INDEX :recent_id ! ON :recent_tbl (id); ! ! ! \echo Dropping :nonempty_tbl ! DROP TABLE :nonempty_tbl; ! \echo Creating :nonempty_tbl ! CREATE TABLE :nonempty_tbl ( ! id INT NOT NULL ! ); ! CREATE UNIQUE INDEX :nonmt_id ! ON :nonempty_tbl (id); ! ! \echo Dropping :link_tbl ! DROP TABLE :link_tbl; ! \echo Creating :link_tbl ! CREATE TABLE :link_tbl ( ! linkfrom INT NOT NULL, ! linkto INT NOT NULL ! ); ! CREATE INDEX :link_from ON :link_tbl (linkfrom); ! CREATE INDEX :link_to ON :link_tbl (linkto); ! ! ! GRANT ALL ON :page_tbl TO :httpd_user; ! GRANT ALL ON :version_tbl TO :httpd_user; ! GRANT ALL ON :recent_tbl TO :httpd_user; ! GRANT ALL ON :nonempty_tbl TO :httpd_user; ! GRANT ALL ON :link_tbl TO :httpd_user; --- schema.minisql DELETED --- --- schema.mysql DELETED --- --- schema.psql DELETED --- |