[Rt-commit] r15678 - rt/branches/3.999-DANGEROUS/lib/RT/Model

ruz at bestpractical.com ruz at bestpractical.com
Sun Aug 31 21:41:54 EDT 2008


Author: ruz
Date: Sun Aug 31 21:41:54 2008
New Revision: 15678

Modified:
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/CachedGroupMember.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm

Log:
* adjust schemas

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm	Sun Aug 31 21:41:54 2008
@@ -58,11 +58,12 @@
 use base 'RT::Record';
 use Jifty::DBI::Schema;
 use Jifty::DBI::Record schema {
-    column object_id => max_length is 11,  type is 'int',          default is '0';
-    column name      => max_length is 200, type is 'varchar(200)', default is '';
     column
         object_type => max_length is 200,
-        type is 'varchar(200)', default is '';
+        type is 'varchar(200)',
+        is mandatory;
+    column object_id => max_length is 11,  type is 'int', is mandatory;
+    column name      => max_length is 200, type is 'varchar(200)', is mandatory;
     column
         description => max_length is 255,
         type is 'varchar(255)', default is '';

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/CachedGroupMember.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/CachedGroupMember.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/CachedGroupMember.pm	Sun Aug 31 21:41:54 2008
@@ -54,11 +54,13 @@
 
 use Jifty::DBI::Schema;
 use Jifty::DBI::Record schema {
-    column group_id            => references RT::Model::Group;
-    column member_id           => references RT::Model::Principal;
+    column group_id            => references RT::Model::Group,
+        is mandatory;
+    column member_id           => references RT::Model::Principal,
+        is mandatory;
     column via                 => references RT::Model::CachedGroupMember;
     column immediate_parent_id => references RT::Model::CachedGroupMember;
-    column disabled            => type is 'integer', default is '0';
+    column disabled            => type is 'integer', is mandatory, default is '0';
 
 };
 

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm	Sun Aug 31 21:41:54 2008
@@ -63,7 +63,7 @@
 
     column name       => max_length is 200, type is 'varchar(200)', default is '';
     column type       => max_length is 200, type is 'varchar(200)', default is '';
-    column max_values => max_length is 11,  type is 'int',          default is '0';
+    column max_values => max_length is 11,  type is 'int',          default is 0;
     column pattern    => type is 'text',    default is '';
     column repeated   => max_length is 6,   type is 'smallint',     default is '0';
     column

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm	Sun Aug 31 21:41:54 2008
@@ -66,7 +66,7 @@
     column last_updated_by => references RT::Model::User;
     column disabled        => type is 'smallint', max_length is 6, default is '0';
     column sort_order      => type is 'int', max_length is 11, default is '0';
-    column Created         => type is 'timestamp';
+    column created         => type is 'timestamp';
     column custom_field    => references RT::Model::CustomField;
     column content         => type is 'varchar(255)', max_length is 255, default is '';
     column

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm	Sun Aug 31 21:41:54 2008
@@ -70,9 +70,9 @@
 use Jifty::DBI::Record schema {
 
     column
-        object_type => max_length is 64,
-        type is 'varchar(64)', default is '';
-    column object_id  => max_length is 11, type is 'int',         default is '0';
+        object_type => max_length is 64, type is 'varchar(64)',
+        is mandatory;
+    column object_id  => max_length is 11, type is 'int',         is mandatory;
     column time_taken => max_length is 11, type is 'int',         default is '0';
     column type       => max_length is 20, type is 'varchar(20)', default is '';
     column field      => max_length is 40, type is 'varchar(40)', default is '';
@@ -84,11 +84,11 @@
         type is 'varchar(255)', default is '';
     column
         reference_type => max_length is 255,
-        type is 'varchar(255)', default is '';
-    column old_reference => max_length is 11,  type is 'int',          default is '0';
-    column new_reference => max_length is 11,  type is 'int',          default is '0';
+        type is 'varchar(255)';
+    column old_reference => max_length is 11,  type is 'int';
+    column new_reference => max_length is 11,  type is 'int';
     column data          => max_length is 255, type is 'varchar(255)', default is '';
-    column creator       => max_length is 11,  type is 'int',          default is '0';
+    column creator       => references RT::Model::User;
     column created       => type is 'timestamp';
 
 };


More information about the Rt-commit mailing list