myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2010] branches/invitation_throttling/db/migrate/


From: noreply
Subject: [myexperiment-hackers] [2010] branches/invitation_throttling/db/migrate/071_create_activity_limits .rb: Throttling.
Date: Thu, 27 Nov 2008 11:39:44 -0500 (EST)

Revision
2010
Author
alekses6
Date
2008-11-27 11:39:43 -0500 (Thu, 27 Nov 2008)

Log Message

Throttling. Minor updates to the migration.

Modified Paths

Diff

Modified: branches/invitation_throttling/db/migrate/071_create_activity_limits.rb (2009 => 2010)


--- branches/invitation_throttling/db/migrate/071_create_activity_limits.rb	2008-11-27 15:29:27 UTC (rev 2009)
+++ branches/invitation_throttling/db/migrate/071_create_activity_limits.rb	2008-11-27 16:39:43 UTC (rev 2010)
@@ -21,10 +21,12 @@
       t.column :limit_frequency, :integer
       
       # number of times the action has already been executed since the last reset (governed by "limit_frequency")
-      t.column :current_count, :integer
+      # (can't be NULL - doesn't make sense to have NULL value for the counter)
+      t.column :current_count, :integer, :null => false
       
       # date/time after which "current_count" is to be reset to "limit_max" (for periodic limits - such as daily message limit)
       # (NULL to indicate that reset should never happen and the limit is absolute, i.e. non-periodic)
+      # (the code will assume that if either --or both-- of "limit_frequency" and "reset_after" are NULLs, the limit is non-periodic)
       t.column :reset_after, :datetime
       
       # date/time after which promotion to the next level (with, probably, higher "limit_max" should happen)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]