[Rt-commit] rt branch, 4.2/scrips-schema-cleanup, created. rt-4.1.8-508-g3e21dcc

Ruslan Zakirov ruz at bestpractical.com
Wed May 29 09:24:33 EDT 2013


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

- Log -----------------------------------------------------------------
commit 3e21dccc051ba4d2966d86650d4643ccba5d7048
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 558d38a..4b992c7 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 a331d4d..6f07e89 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 8e44817..0085fa6 100755
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -145,8 +145,6 @@ CREATE TABLE Scrips (
   Description varchar(255),
   ScripCondition integer NULL DEFAULT 0 ,
   ScripAction integer NULL DEFAULT 0 ,
-  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 cf306f3..31b5316 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.14/schema.Oracle b/etc/upgrade/4.1.14/schema.Oracle
new file mode 100644
index 0000000..5c4609c
--- /dev/null
+++ b/etc/upgrade/4.1.14/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.14/schema.Pg b/etc/upgrade/4.1.14/schema.Pg
new file mode 100644
index 0000000..5c4609c
--- /dev/null
+++ b/etc/upgrade/4.1.14/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.14/schema.mysql b/etc/upgrade/4.1.14/schema.mysql
new file mode 100644
index 0000000..5c4609c
--- /dev/null
+++ b/etc/upgrade/4.1.14/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 c231f44..c0e04d8 100644
--- a/lib/RT/Scrip.pm
+++ b/lib/RT/Scrip.pm
@@ -872,42 +872,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.
@@ -1046,10 +1010,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