summaryrefslogtreecommitdiff
path: root/rt/etc/upgrade/3.9.5
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-04-24 11:35:56 -0700
committerIvan Kohler <ivan@freeside.biz>2012-04-24 11:35:56 -0700
commit6587f6ba7d047ddc1686c080090afe7d53365bd4 (patch)
treeec77342668e8865aca669c9b4736e84e3077b523 /rt/etc/upgrade/3.9.5
parent47153aae5c2fc00316654e7277fccd45f72ff611 (diff)
first pass RT4 merge, RT#13852
Diffstat (limited to 'rt/etc/upgrade/3.9.5')
-rw-r--r--rt/etc/upgrade/3.9.5/backcompat1
-rw-r--r--rt/etc/upgrade/3.9.5/schema.Oracle20
-rw-r--r--rt/etc/upgrade/3.9.5/schema.Pg20
-rw-r--r--rt/etc/upgrade/3.9.5/schema.SQLite19
-rw-r--r--rt/etc/upgrade/3.9.5/schema.mysql20
5 files changed, 80 insertions, 0 deletions
diff --git a/rt/etc/upgrade/3.9.5/backcompat b/rt/etc/upgrade/3.9.5/backcompat
new file mode 100644
index 000000000..611ab5186
--- /dev/null
+++ b/rt/etc/upgrade/3.9.5/backcompat
@@ -0,0 +1 @@
+RT::ACE LastUpdated LastUpdatedBy Creator Created
diff --git a/rt/etc/upgrade/3.9.5/schema.Oracle b/rt/etc/upgrade/3.9.5/schema.Oracle
new file mode 100644
index 000000000..065776dfb
--- /dev/null
+++ b/rt/etc/upgrade/3.9.5/schema.Oracle
@@ -0,0 +1,20 @@
+alter Table CustomFieldValues ADD Category varchar2(255);
+
+UPDATE CustomFieldValues SET Category = (SELECT Content FROM Attributes WHERE
+Name = 'Category' AND ObjectType = 'RT::CustomFieldValue'
+AND CustomFieldValues.id = Attributes.ObjectId);
+
+DELETE FROM Attributes WHERE Name = 'Category' AND ObjectType = 'RT::CustomFieldValue';
+
+ALTER TABLE Groups ADD Creator NUMBER(11,0) DEFAULT 0 NOT NULL;
+ALTER TABLE Groups ADD Created DATE;
+ALTER TABLE Groups ADD LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL;
+ALTER TABLE Groups ADD LastUpdated DATE;
+ALTER TABLE GroupMembers ADD Creator NUMBER(11,0) DEFAULT 0 NOT NULL;
+ALTER TABLE GroupMembers ADD Created DATE;
+ALTER TABLE GroupMembers ADD LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL;
+ALTER TABLE GroupMembers ADD LastUpdated DATE;
+ALTER TABLE ACL ADD Creator NUMBER(11,0) DEFAULT 0 NOT NULL;
+ALTER TABLE ACL ADD Created DATE;
+ALTER TABLE ACL ADD LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL;
+ALTER TABLE ACL ADD LastUpdated DATE;
diff --git a/rt/etc/upgrade/3.9.5/schema.Pg b/rt/etc/upgrade/3.9.5/schema.Pg
new file mode 100644
index 000000000..cea2c4410
--- /dev/null
+++ b/rt/etc/upgrade/3.9.5/schema.Pg
@@ -0,0 +1,20 @@
+alter Table CustomFieldValues ADD Column Category varchar(255);
+
+UPDATE CustomFieldValues SET Category = (SELECT Content FROM Attributes WHERE
+Name = 'Category' AND ObjectType = 'RT::CustomFieldValue'
+AND CustomFieldValues.id = Attributes.ObjectId);
+
+DELETE FROM Attributes WHERE Name = 'Category' AND ObjectType = 'RT::CustomFieldValue';
+
+ALTER TABLE Groups ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE Groups ADD COLUMN Created TIMESTAMP NULL;
+ALTER TABLE Groups ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE Groups ADD COLUMN LastUpdated TIMESTAMP NULL;
+ALTER TABLE GroupMembers ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE GroupMembers ADD COLUMN Created TIMESTAMP NULL;
+ALTER TABLE GroupMembers ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE GroupMembers ADD COLUMN LastUpdated TIMESTAMP NULL;
+ALTER TABLE ACL ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE ACL ADD COLUMN Created TIMESTAMP NULL;
+ALTER TABLE ACL ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE ACL ADD COLUMN LastUpdated TIMESTAMP NULL;
diff --git a/rt/etc/upgrade/3.9.5/schema.SQLite b/rt/etc/upgrade/3.9.5/schema.SQLite
new file mode 100644
index 000000000..c23f89bc7
--- /dev/null
+++ b/rt/etc/upgrade/3.9.5/schema.SQLite
@@ -0,0 +1,19 @@
+ALTER TABLE CustomFieldValues ADD Column Category varchar(255);
+UPDATE CustomFieldValues SET Category = (SELECT Content FROM Attributes WHERE
+Name = 'Category' AND ObjectType = 'RT::CustomFieldValue'
+AND CustomFieldValues.id = Attributes.ObjectId);
+
+DELETE FROM Attributes WHERE Name = 'Category' AND ObjectType = 'RT::CustomFieldValue';
+
+ALTER TABLE Groups ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE Groups ADD COLUMN Created DATETIME NULL;
+ALTER TABLE Groups ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE Groups ADD COLUMN LastUpdated DATETIME NULL;
+ALTER TABLE GroupMembers ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE GroupMembers ADD COLUMN Created DATETIME NULL;
+ALTER TABLE GroupMembers ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE GroupMembers ADD COLUMN LastUpdated DATETIME NULL;
+ALTER TABLE ACL ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE ACL ADD COLUMN Created DATETIME NULL;
+ALTER TABLE ACL ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE ACL ADD COLUMN LastUpdated DATETIME NULL;
diff --git a/rt/etc/upgrade/3.9.5/schema.mysql b/rt/etc/upgrade/3.9.5/schema.mysql
new file mode 100644
index 000000000..4bd0907c0
--- /dev/null
+++ b/rt/etc/upgrade/3.9.5/schema.mysql
@@ -0,0 +1,20 @@
+alter Table CustomFieldValues ADD Column Category varchar(255);
+
+UPDATE CustomFieldValues SET Category = (SELECT Content FROM Attributes WHERE
+Name = 'Category' AND ObjectType = 'RT::CustomFieldValue'
+AND CustomFieldValues.id = Attributes.ObjectId);
+
+DELETE FROM Attributes WHERE Name = 'Category' AND ObjectType = 'RT::CustomFieldValue';
+
+ALTER TABLE Groups ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE Groups ADD COLUMN Created DATETIME NULL;
+ALTER TABLE Groups ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE Groups ADD COLUMN LastUpdated DATETIME NULL;
+ALTER TABLE GroupMembers ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE GroupMembers ADD COLUMN Created DATETIME NULL;
+ALTER TABLE GroupMembers ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE GroupMembers ADD COLUMN LastUpdated DATETIME NULL;
+ALTER TABLE ACL ADD COLUMN Creator integer NOT NULL DEFAULT 0;
+ALTER TABLE ACL ADD COLUMN Created DATETIME NULL;
+ALTER TABLE ACL ADD COLUMN LastUpdatedBy integer NOT NULL DEFAULT 0;
+ALTER TABLE ACL ADD COLUMN LastUpdated DATETIME NULL;