[Rt-commit] rt branch, 4.2/scrips-schema-cleanup, created. rt-4.0.5-282-g93f7a75

Thomas Sibley trs at bestpractical.com
Fri Mar 23 21:29:34 EDT 2012


The branch, 4.2/scrips-schema-cleanup has been created
        at  93f7a75d252988a6cedf7e128881db8a1d334113 (commit)

- Log -----------------------------------------------------------------
commit 93f7a75d252988a6cedf7e128881db8a1d334113
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Mar 23 21:21:19 2012 -0400

    Remove never used fields on Scrips
    
    ConditionRules and ActionRules were introduced by 1037b076 but remained
    unused.  They appear to be an unfinished thought related to scrips and
    approvals and have nothing in common with modern Rules despite sharing
    the same moniker.

diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index 4bcae6c..5d0a666 100755
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -136,8 +136,6 @@ CREATE TABLE Scrips (
 	Description	VARCHAR2(255),
 	ScripCondition 	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	ScripAction	NUMBER(11,0) DEFAULT 0 NOT NULL,
-	ConditionRules	CLOB,
-	ActionRules	CLOB,
 	CustomIsApplicableCode	CLOB,
 	CustomPrepareCode	CLOB,
 	CustomCommitCode	CLOB,
diff --git a/etc/schema.Pg b/etc/schema.Pg
index 565f76b..d0654af 100755
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -225,8 +225,6 @@ CREATE TABLE Scrips (
   Description varchar(255),
   ScripCondition integer NOT NULL DEFAULT 0  ,
   ScripAction integer NOT NULL DEFAULT 0  ,
-  ConditionRules text NULL  ,
-  ActionRules text NULL  ,
   CustomIsApplicableCode text NULL  ,
   CustomPrepareCode text NULL  ,
   CustomCommitCode text NULL  ,
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index 138971c..23972ad 100755
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -145,8 +145,6 @@ CREATE TABLE Scrips (
   Description varchar(255),
   ScripCondition integer NULL  ,
   ScripAction integer NULL  ,
-  ConditionRules text NULL  ,
-  ActionRules text NULL  ,
   CustomIsApplicableCode text NULL  ,
   CustomPrepareCode text NULL  ,
   CustomCommitCode text NULL  ,
diff --git a/etc/schema.mysql b/etc/schema.mysql
index 9ed0337..ec0f15e 100755
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -137,8 +137,6 @@ CREATE TABLE Scrips (
   Description varchar(255),
   ScripCondition integer NOT NULL DEFAULT 0  ,
   ScripAction integer NOT NULL DEFAULT 0  ,
-  ConditionRules text NULL  ,
-  ActionRules text NULL  ,
   CustomIsApplicableCode text NULL  ,
   CustomPrepareCode text NULL  ,
   CustomCommitCode text NULL  ,
diff --git a/etc/upgrade/4.1.0/schema.Oracle b/etc/upgrade/4.1.0/schema.Oracle
new file mode 100644
index 0000000..5c4609c
--- /dev/null
+++ b/etc/upgrade/4.1.0/schema.Oracle
@@ -0,0 +1,2 @@
+ALTER TABLE Scrips DROP COLUMN ConditionRules;
+ALTER TABLE Scrips DROP COLUMN ActionRules;
diff --git a/etc/upgrade/4.1.0/schema.Pg b/etc/upgrade/4.1.0/schema.Pg
new file mode 100644
index 0000000..5c4609c
--- /dev/null
+++ b/etc/upgrade/4.1.0/schema.Pg
@@ -0,0 +1,2 @@
+ALTER TABLE Scrips DROP COLUMN ConditionRules;
+ALTER TABLE Scrips DROP COLUMN ActionRules;
diff --git a/etc/upgrade/4.1.0/schema.SQLite b/etc/upgrade/4.1.0/schema.SQLite
new file mode 100644
index 0000000..5c4609c
--- /dev/null
+++ b/etc/upgrade/4.1.0/schema.SQLite
@@ -0,0 +1,2 @@
+ALTER TABLE Scrips DROP COLUMN ConditionRules;
+ALTER TABLE Scrips DROP COLUMN ActionRules;
diff --git a/etc/upgrade/4.1.0/schema.mysql b/etc/upgrade/4.1.0/schema.mysql
new file mode 100644
index 0000000..5c4609c
--- /dev/null
+++ b/etc/upgrade/4.1.0/schema.mysql
@@ -0,0 +1,2 @@
+ALTER TABLE Scrips DROP COLUMN ConditionRules;
+ALTER TABLE Scrips DROP COLUMN ActionRules;
diff --git a/lib/RT/Scrip.pm b/lib/RT/Scrip.pm
index 3e8f352..d0be35d 100644
--- a/lib/RT/Scrip.pm
+++ b/lib/RT/Scrip.pm
@@ -774,42 +774,6 @@ sub ScripActionObj {
 	return($ScripAction);
 }
 
-=head2 ConditionRules
-
-Returns the current value of ConditionRules.
-(In the database, ConditionRules is stored as text.)
-
-
-
-=head2 SetConditionRules VALUE
-
-
-Set ConditionRules to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ConditionRules will be stored as a text.)
-
-
-=cut
-
-
-=head2 ActionRules
-
-Returns the current value of ActionRules.
-(In the database, ActionRules is stored as text.)
-
-
-
-=head2 SetActionRules VALUE
-
-
-Set ActionRules to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ActionRules will be stored as a text.)
-
-
-=cut
-
-
 =head2 CustomIsApplicableCode
 
 Returns the current value of CustomIsApplicableCode.
@@ -966,10 +930,6 @@ sub _CoreAccessible {
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
         ScripAction =>
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
-        ConditionRules =>
-		{read => 1, write => 1, sql_type => -4, length => 0,  is_blob => 1,  is_numeric => 0,  type => 'text', default => ''},
-        ActionRules =>
-		{read => 1, write => 1, sql_type => -4, length => 0,  is_blob => 1,  is_numeric => 0,  type => 'text', default => ''},
         CustomIsApplicableCode =>
 		{read => 1, write => 1, sql_type => -4, length => 0,  is_blob => 1,  is_numeric => 0,  type => 'text', default => ''},
         CustomPrepareCode =>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list