[geeklog-cvs] geeklog: Added new tables, groups, and permissions to MS SQL fil...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Fri Apr 10 17:33:21 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/2a13f4520557
changeset: 6913:2a13f4520557
user:      Dirk Haun <dirk at haun-online.de>
date:      Fri Apr 10 23:23:21 2009 +0200
description:
Added new tables, groups, and permissions to MS SQL files - "only" need translation into MS SQL syntax ...

diffstat:

4 files changed, 59 insertions(+), 12 deletions(-)
sql/mssql_tableanddata.php           |   47 ++++++++++++++++++++++++++++++++++
sql/mysql_tableanddata.php           |    8 ++---
sql/updates/mssql_1.5.2_to_1.6.0.php |    8 ++---
sql/updates/mysql_1.5.2_to_1.6.0.php |    8 ++---

diffs (209 lines):

diff -r 6aa163a096ea -r 2a13f4520557 sql/mssql_tableanddata.php
--- a/sql/mssql_tableanddata.php	Fri Apr 10 22:31:05 2009 +0200
+++ b/sql/mssql_tableanddata.php	Fri Apr 10 23:23:21 2009 +0200
@@ -73,12 +73,35 @@
 ) ON [PRIMARY]
 ";
 
+/* FIXME - MySQL syntax
+$_SQL[] = "
+CREATE TABLE {$_TABLES['commentedits']} (
+  cid int(10) NOT NULL,
+  uid mediumint(8) NOT NULL,
+  time datetime NOT NULL,
+  PRIMARY KEY (cid)
+) TYPE=MyISAM
+";
+*/
+
 $_SQL[] = "
 CREATE TABLE [dbo].[{$_TABLES['commentmodes']}] (
     [mode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
     [name] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
 ) ON [PRIMARY]
 ";
+
+/* FIXME - MySQL syntax
+$_SQL[] = "
+CREATE TABLE {$_TABLES['commentnotifications']} (
+  cid int(10) default NULL,
+  uid mediumint(8) NOT NULL,
+  deletehash varchar(32) NOT NULL,
+  mid int(10) default NULL,
+  PRIMARY KEY  (deletehash)
+) TYPE=MyISAM 
+";
+*/
 
 $_SQL[] = "
 CREATE TABLE [dbo].[{$_TABLES['comments']}] (
@@ -94,10 +117,29 @@
     [lft] [numeric](10, 0) NULL ,
     [rht] [numeric](10, 0) NULL ,
     [indent] [numeric](10, 0) NULL ,
+    [name] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
     [uid] [int] NULL ,
     [ipaddress] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
 ) ON [PRIMARY]
 ";
+
+/* FIXME - MySQL syntax
+$_SQL[] = "
+CREATE TABLE {$_TABLES['commentsubmissions']} (
+  cid int(10) unsigned NOT NULL auto_increment,
+  type varchar(30) NOT NULL default 'article',
+  sid varchar(40) NOT NULL,
+  date datetime default NULL,
+  title varchar(128) default NULL,
+  comment text,
+  uid mediumint(8) NOT NULL default '1',
+  name varchar(32) default NULL,
+  pid int(10) NOT NULL default '0',
+  ipaddress varchar(15) NOT NULL,
+  PRIMARY KEY  (cid)
+) TYPE=MyISAM
+";
+*/
 
 $_SQL[] = "
 CREATE TABLE [dbo].[{$_TABLES['conf_values']}] (
@@ -249,6 +291,7 @@
     [hits] [numeric](8, 0) NOT NULL ,
     [numemails] [numeric](8, 0) NOT NULL ,
     [comments] [numeric](8, 0) NOT NULL ,
+    [comment_expire] [datetime] NULL ,
     [trackbacks] [numeric](8, 0) NOT NULL ,
     [related] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
     [featured] [tinyint] NOT NULL ,
@@ -1265,6 +1308,8 @@
 INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (17,'plugin.install','Can install/uninstall plugins',1)
 INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (18,'plugin.upload','Can upload new plugins',1)
 INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'group.assign','Ability to assign users to groups',1)
+INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20, 'comment.moderate', 'Ability to moderate comments', 1)
+INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21, 'comment.submit', 'Comments are automatically published', 1)
 
 set identity_insert {$_TABLES['features']} off
 ";
@@ -1322,6 +1367,8 @@
 INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1)
 INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (12,'Mail Admin','Can use Mail Utility',1)
 INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (13,'Logged-in Users','All registered members',1)
+INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (14, 'Comment Admin', 'Can moderate comments', 1)
+INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (15, 'Comment Submitters', 'Can submit comments', 0)
 
 set identity_insert {$_TABLES['groups']} off
 ";
diff -r 6aa163a096ea -r 2a13f4520557 sql/mysql_tableanddata.php
--- a/sql/mysql_tableanddata.php	Fri Apr 10 22:31:05 2009 +0200
+++ b/sql/mysql_tableanddata.php	Fri Apr 10 23:23:21 2009 +0200
@@ -66,7 +66,7 @@
   uid mediumint(8) NOT NULL,
   time datetime NOT NULL,
   PRIMARY KEY (cid)
-) TYPE=MYISAM
+) TYPE=MyISAM
 ";
 
 $_SQL[] = "
@@ -84,7 +84,7 @@
   deletehash varchar(32) NOT NULL,
   mid int(10) default NULL,
   PRIMARY KEY  (deletehash)
-) ENGINE=MyISAM 
+) TYPE=MyISAM 
 ";
 
 $_SQL[] = "
@@ -126,7 +126,7 @@
   pid int(10) NOT NULL default '0',
   ipaddress varchar(15) NOT NULL,
   PRIMARY KEY  (cid)
-) ENGINE=MyISAM
+) TYPE=MyISAM
 ";
 
 $_SQL[] = "
@@ -616,7 +616,7 @@
 $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (17,'plugin.install','Can install/uninstall plugins',1) ";
 $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (18,'plugin.upload','Can upload new plugins',1) ";
 $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'group.assign','Ability to assign users to groups',1) ";
-$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20, 'comment.moderate',  'Ability to moderate comments', 1)";
+$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20, 'comment.moderate', 'Ability to moderate comments', 1)";
 $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21, 'comment.submit', 'Comments are automatically published', 1)";
 
 $_DATA[] = "INSERT INTO {$_TABLES['frontpagecodes']} (code, name) VALUES (0,'Show Only in Topic') ";
diff -r 6aa163a096ea -r 2a13f4520557 sql/updates/mssql_1.5.2_to_1.6.0.php
--- a/sql/updates/mssql_1.5.2_to_1.6.0.php	Fri Apr 10 22:31:05 2009 +0200
+++ b/sql/updates/mssql_1.5.2_to_1.6.0.php	Fri Apr 10 23:23:21 2009 +0200
@@ -19,7 +19,7 @@
   uid mediumint(8) NOT NULL,
   time datetime NOT NULL,
   PRIMARY KEY (cid)
-) TYPE=MYISAM
+) TYPE=MyISAM
 ";
 $_SQL[] = "
 CREATE TABLE {$_TABLES['commentnotifications']} (
@@ -28,7 +28,7 @@
   deletehash varchar(32) NOT NULL,
   mid int(10) default NULL,
   PRIMARY KEY  (deletehash)
-) ENGINE=MyISAM 
+) TYPE=MyISAM 
 ";
 $_SQL[] = "
 CREATE TABLE {$_TABLES['commentsubmissions']} (
@@ -43,14 +43,14 @@
   pid int(10) NOT NULL default '0',
   ipaddress varchar(15) NOT NULL,
   PRIMARY KEY  (cid)
-) ENGINE=MyISAM
+) TYPE=MyISAM
 ";
 $_SQL[] = "ALTER TABLE {$_TABLES['stories']} ADD comment_expire datetime NOT NULL default '0000-00-00 00:00:00' AFTER comments";
 $_SQL[] = "ALTER TABLE {$_TABLES['comments']} ADD name varchar(32) default NULL AFTER indent";
 */
 $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Admin', 'Can moderate comments', 1)";
 $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Submitters', 'Can submit comments', 0);";
-$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate',  'Ability to moderate comments', 1)";
+$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)";
 $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.submit', 'Comments are automatically published', 1)";
 
 /**
diff -r 6aa163a096ea -r 2a13f4520557 sql/updates/mysql_1.5.2_to_1.6.0.php
--- a/sql/updates/mysql_1.5.2_to_1.6.0.php	Fri Apr 10 22:31:05 2009 +0200
+++ b/sql/updates/mysql_1.5.2_to_1.6.0.php	Fri Apr 10 23:23:21 2009 +0200
@@ -19,7 +19,7 @@
   uid mediumint(8) NOT NULL,
   time datetime NOT NULL,
   PRIMARY KEY (cid)
-) TYPE=MYISAM
+) TYPE=MyISAM
 ";
 $_SQL[] = "
 CREATE TABLE {$_TABLES['commentnotifications']} (
@@ -28,7 +28,7 @@
   deletehash varchar(32) NOT NULL,
   mid int(10) default NULL,
   PRIMARY KEY  (deletehash)
-) ENGINE=MyISAM 
+) TYPE=MyISAM 
 ";
 $_SQL[] = "
 CREATE TABLE {$_TABLES['commentsubmissions']} (
@@ -43,13 +43,13 @@
   pid int(10) NOT NULL default '0',
   ipaddress varchar(15) NOT NULL,
   PRIMARY KEY  (cid)
-) ENGINE=MyISAM
+) TYPE=MyISAM
 ";
 $_SQL[] = "ALTER TABLE {$_TABLES['stories']} ADD comment_expire datetime NOT NULL default '0000-00-00 00:00:00' AFTER comments";
 $_SQL[] = "ALTER TABLE {$_TABLES['comments']} ADD name varchar(32) default NULL AFTER indent";
 $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Admin', 'Can moderate comments', 1)";
 $_SQL[] = "INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr, grp_gl_core) VALUES ('Comment Submitters', 'Can submit comments', 0);";
-$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate',  'Ability to moderate comments', 1)";
+$_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.moderate', 'Ability to moderate comments', 1)";
 $_SQL[] = "INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('comment.submit', 'Comments are automatically published', 1)";
 
 /**



More information about the geeklog-cvs mailing list