[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.0alpha1-44-g88bbcbe91f
? sunnavy
sunnavy at bestpractical.com
Mon Mar 30 16:15:03 EDT 2020
The branch, 5.0-trunk has been updated
via 88bbcbe91f312bc27452362f95e3f814d8acb2f0 (commit)
via 023305fd57a68fb2acb46fdf8b06222c5423a03d (commit)
via 47c0ce08b5bbbaddd9a3fc89a61a2eca26bee854 (commit)
via c6d96d3d70d2316c6e17dba943eca9f123b0df4a (commit)
from 28cef70f673979c09c78bc3b6cb068369fc5211a (commit)
Summary of changes:
etc/schema.Oracle | 10 +++++-----
etc/schema.Pg | 10 +++++-----
etc/schema.mysql | 10 +++++-----
etc/upgrade/4.5.4/schema.Oracle | 5 +++++
etc/upgrade/4.5.4/schema.Pg | 5 +++++
etc/upgrade/4.5.4/schema.mysql | 5 +++++
lib/RT/Attachment.pm | 16 ++++++++--------
lib/RT/ObjectCustomFieldValue.pm | 6 +++---
lib/RT/Transaction.pm | 4 ++--
9 files changed, 43 insertions(+), 28 deletions(-)
create mode 100644 etc/upgrade/4.5.4/schema.Oracle
create mode 100644 etc/upgrade/4.5.4/schema.Pg
create mode 100644 etc/upgrade/4.5.4/schema.mysql
- Log -----------------------------------------------------------------
commit 47c0ce08b5bbbaddd9a3fc89a61a2eca26bee854
Author: michel <michel at bestpractical.com>
Date: Mon Mar 2 21:24:53 2020 +0100
Increase the size of id fields for transactions and attachments to number(19,0).
Oracle does not have a bigint data type, number(19,0) is the equivalent.
diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index b71b41d9d4..611e37a927 100644
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -1,10 +1,10 @@
CREATE SEQUENCE ATTACHMENTS_seq;
CREATE TABLE Attachments (
- id NUMBER(11,0)
+ id NUMBER(19,0)
CONSTRAINT Attachments_Key PRIMARY KEY,
- TransactionId NUMBER(11,0) NOT NULL,
- Parent NUMBER(11,0) DEFAULT 0 NOT NULL,
+ TransactionId NUMBER(19,0) NOT NULL,
+ Parent NUMBER(19,0) DEFAULT 0 NOT NULL,
MessageId VARCHAR2(160),
Subject VARCHAR2(255),
Filename VARCHAR2(255),
@@ -106,7 +106,7 @@ CREATE TABLE ScripConditions (
CREATE SEQUENCE TRANSACTIONS_seq;
CREATE TABLE Transactions (
- id NUMBER(11,0)
+ id NUMBER(19,0)
CONSTRAINT Transactions_Key PRIMARY KEY,
ObjectType VARCHAR2(255),
ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL,
@@ -327,7 +327,7 @@ CREATE TABLE ObjectCustomFieldValues (
CONSTRAINT ObjectCustomFieldValues_Key PRIMARY KEY,
CustomField NUMBER(11,0) NOT NULL,
ObjectType VARCHAR2(25) NOT NULL,
- ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL,
+ ObjectId NUMBER(19,0) DEFAULT 0 NOT NULL,
SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL,
Content VARCHAR2(255),
LargeContent CLOB,
diff --git a/etc/upgrade/4.5.4/schema.Oracle b/etc/upgrade/4.5.4/schema.Oracle
new file mode 100644
index 0000000000..6050d76b31
--- /dev/null
+++ b/etc/upgrade/4.5.4/schema.Oracle
@@ -0,0 +1,5 @@
+ALTER TABLE Attachments MODIFY id NUMBER(19,0);
+ALTER TABLE Attachments MODIFY TransactionId NUMBER(19,0);
+ALTER TABLE Attachments MODIFY Parent NUMBER(19,0);
+ALTER TABLE Transactions MODIFY id NUMBER(19,0);
+ALTER TABLE ObjectCustomFieldValues MODIFY ObjectId NUMBER(19,0);
commit 023305fd57a68fb2acb46fdf8b06222c5423a03d
Author: michel <michel at bestpractical.com>
Date: Tue Mar 24 12:36:16 2020 +0100
Update _CoreAccessible and pod for the bigint changes.
diff --git a/lib/RT/Attachment.pm b/lib/RT/Attachment.pm
index 66a0e4e6d1..e75aec6f5e 100644
--- a/lib/RT/Attachment.pm
+++ b/lib/RT/Attachment.pm
@@ -1035,7 +1035,7 @@ sub _CacheConfig {
=head2 id
Returns the current value of id.
-(In the database, id is stored as int(11).)
+(In the database, id is stored as int(19).)
=cut
@@ -1044,7 +1044,7 @@ Returns the current value of id.
=head2 TransactionId
Returns the current value of TransactionId.
-(In the database, TransactionId is stored as int(11).)
+(In the database, TransactionId is stored as int(19).)
@@ -1053,7 +1053,7 @@ Returns the current value of TransactionId.
Set TransactionId to VALUE.
Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, TransactionId will be stored as a int(11).)
+(In the database, TransactionId will be stored as a int(19).)
=cut
@@ -1062,7 +1062,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=head2 Parent
Returns the current value of Parent.
-(In the database, Parent is stored as int(11).)
+(In the database, Parent is stored as int(19).)
@@ -1071,7 +1071,7 @@ Returns the current value of Parent.
Set Parent to VALUE.
Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, Parent will be stored as a int(11).)
+(In the database, Parent will be stored as a int(19).)
=cut
@@ -1226,11 +1226,11 @@ sub _CoreAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(19)', default => ''},
TransactionId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(19)', default => ''},
Parent =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(19)', default => '0'},
MessageId =>
{read => 1, write => 1, sql_type => 12, length => 160, is_blob => 0, is_numeric => 0, type => 'varchar(160)', default => ''},
Subject =>
diff --git a/lib/RT/ObjectCustomFieldValue.pm b/lib/RT/ObjectCustomFieldValue.pm
index 88740fc1f4..a331d0d889 100644
--- a/lib/RT/ObjectCustomFieldValue.pm
+++ b/lib/RT/ObjectCustomFieldValue.pm
@@ -576,7 +576,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=head2 ObjectId
Returns the current value of ObjectId.
-(In the database, ObjectId is stored as int(11).)
+(In the database, ObjectId is stored as int(19).)
@@ -585,7 +585,7 @@ Returns the current value of ObjectId.
Set ObjectId to VALUE.
Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ObjectId will be stored as a int(11).)
+(In the database, ObjectId will be stored as a int(19).)
=cut
@@ -746,7 +746,7 @@ sub _CoreAccessible {
ObjectType =>
{read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
ObjectId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(19)', default => ''},
SortOrder =>
{read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Content =>
diff --git a/lib/RT/Transaction.pm b/lib/RT/Transaction.pm
index 914fe51caf..d1145a6383 100644
--- a/lib/RT/Transaction.pm
+++ b/lib/RT/Transaction.pm
@@ -1762,7 +1762,7 @@ sub ACLEquivalenceObjects {
=head2 id
Returns the current value of id.
-(In the database, id is stored as int(11).)
+(In the database, id is stored as int(19).)
=cut
@@ -1989,7 +1989,7 @@ sub _CoreAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(19)', default => ''},
ObjectType =>
{read => 1, write => 1, sql_type => 12, length => 64, is_blob => 0, is_numeric => 0, type => 'varchar(64)', default => ''},
ObjectId =>
commit 88bbcbe91f312bc27452362f95e3f814d8acb2f0
Merge: 28cef70f67 023305fd57
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Mar 31 04:14:11 2020 +0800
Merge branch '5.0/increase-id-size-in-db' into 5.0-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list