[Bps-public-commit] App-Changeloggr branch, master, updated. 2a5ee224f1556b990ecc87ca1de4d29b5fe8170f

sartak at bestpractical.com sartak at bestpractical.com
Mon Mar 30 15:42:23 EDT 2009


The branch, master has been updated
       via  2a5ee224f1556b990ecc87ca1de4d29b5fe8170f (commit)
      from  d28c5ceb0c9404eda453f644c840b27b263101dc (commit)

Summary of changes:
 lib/App/Changeloggr/Model/Change.pm    |   17 ++++++++++++-----
 lib/App/Changeloggr/Model/Changelog.pm |    3 ++-
 lib/App/Changeloggr/Model/Vote.pm      |    8 +++++++-
 3 files changed, 21 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 2a5ee224f1556b990ecc87ca1de4d29b5fe8170f
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 15:41:59 2009 -0400

    Tighten up the column restrictions by adding mandatory and immutable
    where it makes sense

diff --git a/lib/App/Changeloggr/Model/Change.pm b/lib/App/Changeloggr/Model/Change.pm
index b52e7c0..aaae540 100644
--- a/lib/App/Changeloggr/Model/Change.pm
+++ b/lib/App/Changeloggr/Model/Change.pm
@@ -6,19 +6,25 @@ use Jifty::DBI::Schema;
 
 use App::Changeloggr::Record schema {
     column changelog =>
-        refers_to App::Changeloggr::Model::Changelog;
+        refers_to App::Changeloggr::Model::Changelog,
+        is mandatory,
+        is immutable;
 
     column raw =>
         type is 'text',
-        label is 'Raw';
+        label is 'Raw',
+        is mandatory,
+        is immutable;
 
     column identifier =>
         type is 'text',
-        label is 'Identifier';
+        label is 'Identifier',
+        is mandatory;
 
     column author =>
         type is 'text',
-        label is 'Author';
+        label is 'Author',
+        is mandatory;
 
     column date =>
         type is 'timestamp',
@@ -27,7 +33,8 @@ use App::Changeloggr::Record schema {
 
     column message =>
         type is 'text',
-        label is 'Body';
+        label is 'Body',
+        is mandatory;
 
     column diffstat =>
         type is 'text',
diff --git a/lib/App/Changeloggr/Model/Changelog.pm b/lib/App/Changeloggr/Model/Changelog.pm
index 496efa3..005b8a4 100644
--- a/lib/App/Changeloggr/Model/Changelog.pm
+++ b/lib/App/Changeloggr/Model/Changelog.pm
@@ -9,7 +9,8 @@ use App::Changeloggr::Record schema {
     column name =>
         type is 'text',
         label is 'Project name',
-        is distinct;
+        is distinct,
+        is mandatory;
 
     column done =>
         is boolean,
diff --git a/lib/App/Changeloggr/Model/Vote.pm b/lib/App/Changeloggr/Model/Vote.pm
index fb5906a..b86aed4 100644
--- a/lib/App/Changeloggr/Model/Vote.pm
+++ b/lib/App/Changeloggr/Model/Vote.pm
@@ -8,15 +8,21 @@ use Scalar::Defer 'defer';
 use App::Changeloggr::Record schema {
     column change =>
         refers_to App::Changeloggr::Model::Change,
+        is mandatory,
+        is immutable,
         is protected;
 
     column user_session_id =>
         type is 'text',
         default is defer { Jifty->web->session->id },
+        is mandatory,
+        is immutable,
         is private;
 
     column tag =>
-        type is 'text';
+        type is 'text',
+        is mandatory,
+        is immutable;
 };
 
 sub current_user_can {

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



More information about the Bps-public-commit mailing list