[Rt-commit] [svn] r1291 - in rtfm/branches/2.1-TESTING: . etc/upgrade etc/upgrade/2.1 html/RTFM html/RTFM/Article/Elements

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Wed Jul 28 16:58:01 EDT 2004


Author: alexmv
Date: Wed Jul 28 16:58:00 2004
New Revision: 1291

Added:
   rtfm/branches/2.1-TESTING/etc/upgrade/
   rtfm/branches/2.1-TESTING/etc/upgrade/2.1/
   rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.Oracle
   rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.Pg
   rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.mysql
   rtfm/branches/2.1-TESTING/etc/upgrade/2.1/content
   rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.Oracle
   rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.Pg
   rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.mysql
Modified:
   rtfm/branches/2.1-TESTING/Makefile
   rtfm/branches/2.1-TESTING/README
   rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowTopics
   rtfm/branches/2.1-TESTING/html/RTFM/Topics.html
Log:
 * Link topics to the topic hierarchy browser

 * Include etc/upgrade tree for schema changes from 2.0, and document
   in Makefile and README


Modified: rtfm/branches/2.1-TESTING/Makefile
==============================================================================
--- rtfm/branches/2.1-TESTING/Makefile	(original)
+++ rtfm/branches/2.1-TESTING/Makefile	Wed Jul 28 16:58:00 2004
@@ -50,7 +50,7 @@
 
 
 
-upgrade: install-lib install-html install-lexicon
+upgrade: install-lib install-html install-lexicon upgrade-instruct
 install: upgrade initdb
 
 html-install: install-html
@@ -140,3 +140,13 @@
 	/usr/sbin/apachectl start
 
 
+upgrade-instruct:
+	@echo "Congratulations. RT/FM has been upgraded.  However,"
+	@echo "you should update RT/FM's system database objects by running "
+	@echo "   ls etc/upgrade"
+	@echo ""
+	@echo "For each item in that directory whose name is greater than"
+	@echo "your previously installed RT version, run:"
+	@echo "    $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action schema --datadir etc/upgrade/<version>"
+	@echo "    $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action acl --datadir etc/upgrade/<version>"
+	@echo "    $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action insert --datadir etc/upgrade/<version>"

Modified: rtfm/branches/2.1-TESTING/README
==============================================================================
--- rtfm/branches/2.1-TESTING/README	(original)
+++ rtfm/branches/2.1-TESTING/README	Wed Jul 28 16:58:00 2004
@@ -43,7 +43,17 @@
 
 3) Type "make upgrade"
 
-4) stop and start your web server
+4) Type "ls etc/upgrade"; For each item in that directory whose name
+   is greater than your previously installed RT version, run:
+
+            /opt/rt3/sbin/rt-setup-database --action schema \
+                --datadir etc/upgrade/<version>
+            /opt/rt3/sbin/rt-setup-database --action acl \
+                --datadir etc/upgrade/<version>
+            /opt/rt3/sbin/rt-setup-database --action insert \
+                 --datadir etc/upgrade/<version>
+
+5) stop and start your web server
 
 
 Installation instructions:

Added: rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.Oracle
==============================================================================
--- (empty file)
+++ rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.Oracle	Wed Jul 28 16:58:00 2004
@@ -0,0 +1,4 @@
+sub acl {
+    return ();
+}
+1;

Added: rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.Pg
==============================================================================
--- (empty file)
+++ rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.Pg	Wed Jul 28 16:58:00 2004
@@ -0,0 +1,24 @@
+
+sub acl {
+    my $dbh = shift;
+
+    my @acls;
+
+    my @tables = qw (
+FM_Topics_id_seq
+FM_Topics
+FM_ObjectTopics_id_seq
+FM_ObjectTopics
+    );
+
+    foreach my $table (@tables) {
+        push @acls,
+          "GRANT SELECT, INSERT, UPDATE, DELETE ON $table to "
+          . $RT::DatabaseUser . ";";
+
+    }
+    return (@acls);
+}
+1;
+
+

Added: rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.mysql
==============================================================================
--- (empty file)
+++ rtfm/branches/2.1-TESTING/etc/upgrade/2.1/acl.mysql	Wed Jul 28 16:58:00 2004
@@ -0,0 +1,4 @@
+sub acl {
+    return ();
+}
+1;

Added: rtfm/branches/2.1-TESTING/etc/upgrade/2.1/content
==============================================================================
--- (empty file)
+++ rtfm/branches/2.1-TESTING/etc/upgrade/2.1/content	Wed Jul 28 16:58:00 2004
@@ -0,0 +1,2 @@
+# nothing to do
+1;

Added: rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.Oracle
==============================================================================
--- (empty file)
+++ rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.Oracle	Wed Jul 28 16:58:00 2004
@@ -0,0 +1,20 @@
+CREATE SEQUENCE FM_Topics_seq;
+CREATE TABLE FM_Topics (
+id NUMBER(11,0)
+  CONSTRAINT FM_Topics_key PRIMARY KEY,
+Parent NUMBER(11,0) DEFAULT 0 NOT NULL,
+Name varchar2(255) DEFAULT '' NOT NULL,
+Description varchar2(255) DEFAULT '' NOT NULL,
+ObjectType varchar2(64) DEFAULT '' NOT NULL,
+ObjectId NUMBER(11,0) NOT NULL
+);
+
+
+CREATE SEQUENCE FM_ObjectTopics_seq;
+CREATE TABLE FM_ObjectTopics (
+id NUMBER(11,0)
+  CONSTRAINT FM_ObjectTopics_key PRIMARY KEY,
+Topic NUMBER(11,0) NOT NULL,
+ObjectType varchar2(64) DEFAULT '' NOT NULL,
+ObjectId NUMBER(11,0) NOT NULL
+);

Added: rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.Pg
==============================================================================
--- (empty file)
+++ rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.Pg	Wed Jul 28 16:58:00 2004
@@ -0,0 +1,18 @@
+CREATE TABLE FM_Topics (
+id SERIAL,
+Parent integer NOT NULL DEFAULT 0,
+Name varchar(255) NOT NULL DEFAULT '',
+Description varchar(255) NOT NULL DEFAULT '',
+ObjectType varchar(64) NOT NULL DEFAULT '',
+ObjectId integer NOT NULL,
+PRIMARY KEY (id)
+);
+
+
+CREATE TABLE FM_ObjectTopics (
+id SERIAL,
+Topic integer NOT NULL,
+ObjectType varchar(64) NOT NULL DEFAULT '',
+ObjectId integer NOT NULL,
+PRIMARY KEY (id)
+);

Added: rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.mysql
==============================================================================
--- (empty file)
+++ rtfm/branches/2.1-TESTING/etc/upgrade/2.1/schema.mysql	Wed Jul 28 16:58:00 2004
@@ -0,0 +1,18 @@
+CREATE TABLE FM_Topics (
+id INTEGER NOT NULL AUTO_INCREMENT,
+Parent integer NOT NULL DEFAULT 0,
+Name varchar(255) NOT NULL DEFAULT '',
+Description varchar(255) NOT NULL DEFAULT '',
+ObjectType varchar(64) NOT NULL DEFAULT '',
+ObjectId integer NOT NULL,
+PRIMARY KEY (id)
+) TYPE=InnoDB;
+
+
+CREATE TABLE FM_ObjectTopics (
+id INTEGER NOT NULL AUTO_INCREMENT,
+Topic integer NOT NULL,
+ObjectType varchar(64) NOT NULL DEFAULT '',
+ObjectId integer NOT NULL,
+PRIMARY KEY (id)
+) TYPE=InnoDB;

Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowTopics
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowTopics	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowTopics	Wed Jul 28 16:58:00 2004
@@ -26,13 +26,20 @@
 %   my @path;
 %   my $t = $t->TopicObj;
 %   while ($t->Id) {
-%     unshift @path, $t->Name;
+%     unshift @path, $t;
 %     $t = $t->ParentObj;
 %   }
-%   push @topics, join(" : ", @path);
+%   push @topics, \@path;
 % }
 % for (sort @topics) {
-<li><% $_ %></li>
+<li>
+% for (@{$_}) {
+% if ($_->ParentObj->Id) {
+ : 
+% }
+<a href="<% $RT::WebPath %>/RTFM/Topics.html?class=<% $_->ObjectId %>&id=<% $_->Id %>"><% $_->Name %></a>
+% }
+</li>
 % }
 </ul>
 % } else {

Modified: rtfm/branches/2.1-TESTING/html/RTFM/Topics.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Topics.html	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Topics.html	Wed Jul 28 16:58:00 2004
@@ -75,14 +75,6 @@
 
 % }
 
-<%init>
-my $Classes;
-if (defined $class) {
-    
-} else {
-}
-</%init>
-
 <%args>
 $id => 0
 $class => undef


More information about the Rt-commit mailing list