[Rt-commit] rt branch, 4.2/dashboard-tables, created. rt-4.0.0rc6-173-g01896a8

Shawn Moore sartak at bestpractical.com
Mon Mar 21 10:15:12 EDT 2011


The branch, 4.2/dashboard-tables has been created
        at  01896a802cd43dc3106b47477cf68f7dbc110c4b (commit)

- Log -----------------------------------------------------------------
commit d8e530e541b4827082825ca6ca56068f3a7bf0b3
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Mar 21 09:47:49 2011 -0400

    Give RT::Dashboard the _CoreAccessible treatment

diff --git a/lib/RT/Dashboard.pm b/lib/RT/Dashboard.pm
index 431eb9b..286cf9a 100644
--- a/lib/RT/Dashboard.pm
+++ b/lib/RT/Dashboard.pm
@@ -427,6 +427,92 @@ sub CurrentUserCanCreateAny {
     return 0;
 }
 
+=head2 id
+
+Returns the current value of id.
+(In the database, id is stored as int(11).)
+
+=head2 Name
+
+Returns the current value of Name.
+(In the database, Name is stored as varchar(255).)
+
+=head2 SetName VALUE
+
+Set Name to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Name will be stored as a varchar(255).)
+
+=head2 Content
+
+Returns the current value of Content.
+(In the database, Content is stored as blob.)
+
+=head2 SetContent VALUE
+
+Set Content to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Content will be stored as a blob.)
+
+=head2 ObjectType
+
+Returns the current value of ObjectType.
+(In the database, ObjectType is stored as varchar(64).)
+
+=head2 SetObjectType VALUE
+
+Set ObjectType to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ObjectType will be stored as a varchar(64).)
+
+=head2 ObjectId
+
+Returns the current value of ObjectId.
+(In the database, ObjectId is stored as int(11).)
+
+=head2 SetObjectId VALUE
+
+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).)
+
+=head2 Creator
+
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
+
+=head2 Created
+
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
+
+=head2 LastUpdatedBy
+
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
+
+=head2 LastUpdated
+
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
+
+=cut
+
+sub _CoreAccessible {
+    {
+        id => {read => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => ''},
+        Name => {read => 1, write => 1, sql_type => 12, length => 255,  is_blob => 0,  is_numeric => 0,  type => 'varchar(255)', default => ''},
+        Content => {read => 1, write => 1, sql_type => -4, length => 0,  is_blob => 1,  is_numeric => 0,  type => 'blob', default => ''},
+        ObjectType => {read => 1, write => 1, sql_type => 12, length => 64,  is_blob => 0,  is_numeric => 0,  type => 'varchar(64)', default => ''},
+        ObjectId => {read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => ''},
+        Creator => {read => 1, auto => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
+        Created => {read => 1, auto => 1, sql_type => 11, length => 0,  is_blob => 0,  is_numeric => 0,  type => 'datetime', default => ''},
+        LastUpdatedBy => {read => 1, auto => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
+        LastUpdated => {read => 1, auto => 1, sql_type => 11, length => 0,  is_blob => 0,  is_numeric => 0,  type => 'datetime', default => ''},
+ }
+};
+
 RT::Base->_ImportOverlays();
 
 1;
+

commit 3f3d8bf23cae959ef0525cd61847dd4f4754b205
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Mar 21 10:07:05 2011 -0400

    Dashboard schema

diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index 4bcae6c..4fb1397 100755
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -479,3 +479,17 @@ Created DATE,
 LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
 LastUpdated DATE
 );
+
+CREATE SEQUENCE Dashboards_seq;
+CREATE TABLE Dashboards (
+	id 			NUMBER(11,0) PRIMARY KEY,
+	Name 			VARCHAR2(255) NOT NULL,
+  	Content 	CLOB,
+	ObjectType	VARCHAR2(25) NOT NULL,
+	ObjectId	NUMBER(11,0) DEFAULT 0 NOT NULL,
+	Creator 		NUMBER(11,0) DEFAULT 0 NOT NULL,
+	Created 		DATE,
+	LastUpdatedBy 		NUMBER(11,0) DEFAULT 0 NOT NULL,
+	LastUpdated		DATE
+);
+
diff --git a/etc/schema.Pg b/etc/schema.Pg
index 565f76b..8e0b940 100755
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -713,3 +713,17 @@ LastUpdated TIMESTAMP NULL,
 PRIMARY KEY (id)
 );
 
+CREATE SEQUENCE dashboards_id_seq;
+CREATE TABLE Dashboards (
+  id INTEGER DEFAULT nextval('dashboards_id_seq'),
+  Name varchar(255) NOT NULL,
+  Content text,
+  ObjectType varchar(64),
+  ObjectId integer,
+  Creator integer NOT NULL DEFAULT 0,
+  Created TIMESTAMP NULL,
+  LastUpdatedBy integer NOT NULL DEFAULT 0,
+  LastUpdated TIMESTAMP NULL,
+  PRIMARY KEY (id)
+);
+
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index 138971c..139387e 100755
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -504,3 +504,16 @@ Created TIMESTAMP NULL,
 LastUpdatedBy integer NOT NULL DEFAULT 0,
 LastUpdated TIMESTAMP NULL
 );
+
+CREATE TABLE Dashboards (
+  id INTEGER PRIMARY KEY,
+  Name varchar(255) NOT NULL,
+  Content LONGTEXT NULL,
+  ObjectType varchar(25) NOT NULL,
+  ObjectId INTEGER default 0,
+  Creator integer NULL,
+  Created DATETIME NULL,
+  LastUpdatedBy integer NULL,
+  LastUpdated DATETIME NULL
+);
+
diff --git a/etc/schema.mysql b/etc/schema.mysql
index c313aaf..4d7bb5c 100755
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -497,3 +497,16 @@ CREATE TABLE ObjectClasses (
   LastUpdated datetime default NULL,
   PRIMARY KEY  (id)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE Dashboards (
+  id INTEGER NOT NULL AUTO_INCREMENT,
+  Name varchar(255) NULL,
+  Content BLOB,
+  ObjectType varchar(64) CHARACTER SET ascii,
+  ObjectId integer,
+  Creator integer NOT NULL DEFAULT 0,
+  Created DATETIME NULL,
+  LastUpdatedBy integer NOT NULL DEFAULT 0,
+  LastUpdated DATETIME NULL,
+  PRIMARY KEY (id)
+) ENGINE=InnoDB CHARACTER SET utf8;

commit 01896a802cd43dc3106b47477cf68f7dbc110c4b
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Mar 21 10:09:13 2011 -0400

    Upgrade schemata for dashboards

diff --git a/etc/upgrade/4.1.1/schema.Oracle b/etc/upgrade/4.1.1/schema.Oracle
new file mode 100644
index 0000000..5c94c5c
--- /dev/null
+++ b/etc/upgrade/4.1.1/schema.Oracle
@@ -0,0 +1,13 @@
+CREATE SEQUENCE Dashboards_seq;
+CREATE TABLE Dashboards (
+	id 			NUMBER(11,0) PRIMARY KEY,
+	Name 			VARCHAR2(255) NOT NULL,
+  	Content 	CLOB,
+	ObjectType	VARCHAR2(25) NOT NULL,
+	ObjectId	NUMBER(11,0) DEFAULT 0 NOT NULL,
+	Creator 		NUMBER(11,0) DEFAULT 0 NOT NULL,
+	Created 		DATE,
+	LastUpdatedBy 		NUMBER(11,0) DEFAULT 0 NOT NULL,
+	LastUpdated		DATE
+);
+
diff --git a/etc/upgrade/4.1.1/schema.Pg b/etc/upgrade/4.1.1/schema.Pg
new file mode 100644
index 0000000..5ad0c15
--- /dev/null
+++ b/etc/upgrade/4.1.1/schema.Pg
@@ -0,0 +1,14 @@
+CREATE SEQUENCE dashboards_id_seq;
+CREATE TABLE Dashboards (
+  id INTEGER DEFAULT nextval('dashboards_id_seq'),
+  Name varchar(255) NOT NULL,
+  Content text,
+  ObjectType varchar(64),
+  ObjectId integer,
+  Creator integer NOT NULL DEFAULT 0,
+  Created TIMESTAMP NULL,
+  LastUpdatedBy integer NOT NULL DEFAULT 0,
+  LastUpdated TIMESTAMP NULL,
+  PRIMARY KEY (id)
+);
+
diff --git a/etc/upgrade/4.1.1/schema.SQLite b/etc/upgrade/4.1.1/schema.SQLite
new file mode 100644
index 0000000..12a41ec
--- /dev/null
+++ b/etc/upgrade/4.1.1/schema.SQLite
@@ -0,0 +1,12 @@
+CREATE TABLE Dashboards (
+  id INTEGER PRIMARY KEY,
+  Name varchar(255) NOT NULL,
+  Content LONGTEXT NULL,
+  ObjectType varchar(25) NOT NULL,
+  ObjectId INTEGER default 0,
+  Creator integer NULL,
+  Created DATETIME NULL,
+  LastUpdatedBy integer NULL,
+  LastUpdated DATETIME NULL
+);
+
diff --git a/etc/upgrade/4.1.1/schema.mysql b/etc/upgrade/4.1.1/schema.mysql
new file mode 100644
index 0000000..4dfdcbd
--- /dev/null
+++ b/etc/upgrade/4.1.1/schema.mysql
@@ -0,0 +1,13 @@
+CREATE TABLE Dashboards (
+  id INTEGER NOT NULL AUTO_INCREMENT,
+  Name varchar(255) NULL,
+  Content BLOB,
+  ObjectType varchar(64) CHARACTER SET ascii,
+  ObjectId integer,
+  Creator integer NOT NULL DEFAULT 0,
+  Created DATETIME NULL,
+  LastUpdatedBy integer NOT NULL DEFAULT 0,
+  LastUpdated DATETIME NULL,
+  PRIMARY KEY (id)
+) ENGINE=InnoDB CHARACTER SET utf8;
+

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


More information about the Rt-commit mailing list