summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert2003-10-22 20:20:35 (GMT)
committerDries Buytaert2003-10-22 20:20:35 (GMT)
commit72ae2d39953125a231592d2a2b7ad14afe35b1bd (patch)
tree1b261d628460a8db3775d6d83c1f928d2726ce1d /database
parent742410aafdf3d85ec3f0060e5c9fd1d09ee71672 (diff)
- Bugfix: renamed the 'statistics' table to 'node_counter' as 'statistics' is
a reserved SQL keyword. Required for both PostgreSQL and MSSQL. Patch by Adrian. - Bugfix: renamed the 'path' table to 'url_alias' as 'path' is a reserved SQL keyword. Required for both PostgreSQL and MSSQL. Patch by Adrian.
Diffstat (limited to 'database')
-rw-r--r--database/database.mssql18
-rw-r--r--database/database.mysql10
-rw-r--r--database/database.pgsql42
3 files changed, 35 insertions, 35 deletions
diff --git a/database/database.mssql b/database/database.mssql
index f323cd2..21a8d72 100644
--- a/database/database.mssql
+++ b/database/database.mssql
@@ -214,21 +214,21 @@ CREATE TABLE [dbo].[page] (
) ON [PRIMARY]
GO
-CREATE TABLE [dbo].[path] (
+CREATE TABLE [dbo].[url_alias] (
[pid] numeric (10, 0) NOT NULL,
[dst] [varchar] (128) NOT NULL,
[src] [varchar] (128) NOT NULL
) ON [PRIMARY]
GO
-ALTER TABLE [dbo].[path] WITH NOCHECK ADD
- CONSTRAINT [DF_[path_pid] DEFAULT (0) FOR [pid],
- CONSTRAINT [DF_path_dst] DEFAULT ('') FOR [dst],
- CONSTRAINT [DF_path_src] DEFAULT ('') FOR [src]
+ALTER TABLE [dbo].[url_alias] WITH NOCHECK ADD
+ CONSTRAINT [DF_[url_alias_pid] DEFAULT (0) FOR [pid],
+ CONSTRAINT [DF_url_alias_dst] DEFAULT ('') FOR [dst],
+ CONSTRAINT [DF_url_alias_src] DEFAULT ('') FOR [src]
GO
-CREATE INDEX [path_src_idx] ON [dbo].[path]([src]) ON [PRIMARY]
-CREATE INDEX path_dst_idx ON path(dst);
+CREATE INDEX [url_alias_src_idx] ON [dbo].[url_alias]([src]) ON [PRIMARY]
+CREATE INDEX url_alias_dst_idx ON url_alias(dst);
GO
CREATE TABLE [dbo].[permission] (
@@ -298,7 +298,7 @@ CREATE TABLE [dbo].[site] (
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
-CREATE TABLE [dbo].[statistics] (
+CREATE TABLE [dbo].[node_counter] (
[nid] [int] NOT NULL ,
[totalcount] [numeric](20, 0) NOT NULL ,
[daycount] [numeric](4, 0) NOT NULL ,
@@ -500,7 +500,7 @@ INSERT INTO system VALUES ('modules/story.module','story','module','',1);
INSERT INTO system VALUES ('modules/taxonomy.module','taxonomy','module','',1);
INSERT INTO system VALUES ('themes/marvin/marvin.theme','marvin','theme','Internet explorer, Netscape, Opera',1);
-INSERT INTO variable(name,value) VALUES('update_start', 's:10:"2002-05-15";');
+INSERT INTO variable(name,value) VALUES('update_start', 's:10:"2003-10-22";');
INSERT INTO variable(name,value) VALUES('theme_default','s:6:"marvin";');
INSERT INTO users(uid,name,mail,rid) VALUES(0,'Anonymous','root@localhost','1');
diff --git a/database/database.mysql b/database/database.mysql
index ef50763..115a736 100644
--- a/database/database.mysql
+++ b/database/database.mysql
@@ -302,10 +302,10 @@ CREATE TABLE page (
) TYPE=MyISAM;
--
--- Table structure for table 'path'
+-- Table structure for table 'url_alias'
--
-CREATE TABLE path (
+CREATE TABLE url_alias (
pid int(10) unsigned NOT NULL auto_increment,
src varchar(128) NOT NULL default '',
dst varchar(128) NOT NULL default '',
@@ -421,10 +421,10 @@ CREATE TABLE site (
) TYPE=MyISAM;
--
--- Table structure for table 'statistics'
+-- Table structure for table 'node_counter'
--
-CREATE TABLE statistics (
+CREATE TABLE node_counter (
nid int(11) NOT NULL default '0',
totalcount bigint(20) unsigned NOT NULL default '0',
daycount mediumint(8) unsigned NOT NULL default '0',
@@ -590,7 +590,7 @@ INSERT INTO system VALUES ('modules/taxonomy.module','taxonomy','module','',1);
INSERT INTO system VALUES ('themes/marvin/marvin.theme','marvin','theme','Internet explorer, Netscape, Opera',1);
INSERT INTO users (uid, name, mail, rid) VALUES ('0', 'Anonymous', 'root@localhost', '1');
-REPLACE variable SET name='update_start', value='s:10:"2003-09-29;"';
+REPLACE variable SET name='update_start', value='s:10:"2003-10-22;"';
REPLACE variable SET name='theme_default', value='s:6:"marvin";';
REPLACE blocks SET module = 'user', delta = '0', status = '1';
diff --git a/database/database.pgsql b/database/database.pgsql
index cba2ca5..4bf21d8 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -288,6 +288,21 @@ CREATE INDEX node_moderate_idx ON node (moderate);
CREATE INDEX node_promote_status_idx ON node (promote, status);
--
+-- Table structure for table 'node_counter'
+--
+
+CREATE TABLE node_counter (
+ nid integer NOT NULL default '0',
+ totalcount integer NOT NULL default '0',
+ daycount integer NOT NULL default '0',
+ timestamp integer NOT NULL default '0',
+ PRIMARY KEY (nid)
+);
+CREATE INDEX node_counter_totalcount_idx ON node_counter(totalcount);
+CREATE INDEX node_counter_daycount_idx ON node_counter(daycount);
+CREATE INDEX node_counter_timestamp_idx ON node_counter(timestamp);
+
+--
-- Table structure for page
--
@@ -301,18 +316,17 @@ CREATE TABLE page (
CREATE INDEX page_nid_idx ON page(nid);
--
--- Table structure for table 'path'
+-- Table structure for table 'url_alias'
--
-CREATE TABLE path (
- pid integer NOT NULL default '0',
+CREATE TABLE url_alias (
+ pid serial,
dst varchar(128) NOT NULL default '',
src varchar(128) NOT NULL default '',
PRIMARY KEY (pid)
);
-CREATE INDEX path_src_idx ON path(src);
-CREATE INDEX path_dst_idx ON path(dst);
-
+CREATE INDEX url_alias_src_idx ON url_alias(src);
+CREATE INDEX url_alias_dst_idx ON url_alias(dst);
--
-- Table structure for permission
--
@@ -417,20 +431,6 @@ CREATE TABLE site (
UNIQUE (link)
);
---
--- Table structure for table 'statistics'
---
-
-CREATE TABLE statistics (
- nid integer NOT NULL default '0',
- totalcount integer NOT NULL default '0',
- daycount integer NOT NULL default '0',
- timestamp integer NOT NULL default '0',
- PRIMARY KEY (nid)
-);
-CREATE INDEX statistics_totalcount_idx ON statistics(totalcount);
-CREATE INDEX statistics_daycount_idx ON statistics(daycount);
-CREATE INDEX statistics_timestamp_idx ON statistics(timestamp);
--
-- Table structure for system
@@ -590,7 +590,7 @@ INSERT INTO system VALUES ('modules/story.module','story','module','',1);
INSERT INTO system VALUES ('modules/taxonomy.module','taxonomy','module','',1);
INSERT INTO system VALUES ('themes/marvin/marvin.theme','marvin','theme','Internet explorer, Netscape, Opera',1);
-INSERT INTO variable(name,value) VALUES('update_start', 's:10:"2003-09-29";');
+INSERT INTO variable(name,value) VALUES('update_start', 's:10:"2003-10-22";');
INSERT INTO variable(name,value) VALUES('theme_default','s:6:"marvin";');
INSERT INTO users(uid,name,mail,rid) VALUES(0,'Anonymous','root@localhost', '1');