myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [1936] branches/event_logging: Event logging.


From: noreply
Subject: [myexperiment-hackers] [1936] branches/event_logging: Event logging.
Date: Mon, 10 Nov 2008 10:01:12 -0500 (EST)

Revision
1936
Author
alekses6
Date
2008-11-10 10:01:11 -0500 (Mon, 10 Nov 2008)

Log Message

Event logging. "acts_as_activity_logged" plugin modified to allow storing of data hashes in the "activity_logs" table.

Modified Paths

Diff

Modified: branches/event_logging/db/migrate/068_create_activity_logs.rb (1935 => 1936)


--- branches/event_logging/db/migrate/068_create_activity_logs.rb	2008-11-10 13:18:05 UTC (rev 1935)
+++ branches/event_logging/db/migrate/068_create_activity_logs.rb	2008-11-10 15:01:11 UTC (rev 1936)
@@ -3,7 +3,7 @@
   # work with Rails 1.2.6 as well
   
   def self.up
-    create_table :activity_logs, :options => "DEFAULT CHARSET = utf8" do |t|
+    create_table :activity_logs do |t|
       t.column :action, :string
       t.column :activity_loggable_type, :string
       t.column :activity_loggable_id, :integer
@@ -13,6 +13,7 @@
       t.column :referenced_id, :integer
       t.column :created_at, :datetime
       t.column :updated_at, :datetime
+      t.column :data, :binary, :limit => 1048576 # in bytes; = 1MB
     end
   end
 

Modified: branches/event_logging/vendor/plugins/acts_as_activity_logged/generators/activity_logged_migration/templates/migration.rb (1935 => 1936)


--- branches/event_logging/vendor/plugins/acts_as_activity_logged/generators/activity_logged_migration/templates/migration.rb	2008-11-10 13:18:05 UTC (rev 1935)
+++ branches/event_logging/vendor/plugins/acts_as_activity_logged/generators/activity_logged_migration/templates/migration.rb	2008-11-10 15:01:11 UTC (rev 1936)
@@ -3,7 +3,7 @@
   # work with Rails 1.2.6 as well
   
   def self.up
-    create_table :activity_logs, :options => "DEFAULT CHARSET = utf8" do |t|
+    create_table :activity_logs do |t|
       t.column :action, :string
       t.column :activity_loggable_type, :string
       t.column :activity_loggable_id, :integer
@@ -13,6 +13,7 @@
       t.column :referenced_id, :integer
       t.column :created_at, :datetime
       t.column :updated_at, :datetime
+      t.column :data, :binary, :limit => 1048576 # in bytes; = 1MB
     end
   end
 

Modified: branches/event_logging/vendor/plugins/acts_as_activity_logged/lib/activity_log.rb (1935 => 1936)


--- branches/event_logging/vendor/plugins/acts_as_activity_logged/lib/activity_log.rb	2008-11-10 13:18:05 UTC (rev 1935)
+++ branches/event_logging/vendor/plugins/acts_as_activity_logged/lib/activity_log.rb	2008-11-10 15:01:11 UTC (rev 1936)
@@ -2,6 +2,8 @@
   belongs_to :activity_loggable, :polymorphic => true
   belongs_to :referenced, :polymorphic => true
   belongs_to :culprit, :polymorphic => true
+  
+  serialize :data
 
   alias the_culprit culprit
   def culprit(options="nil")

reply via email to

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