myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2237] branches/event_logging/db/migrate: Rename


From: noreply
Subject: [myexperiment-hackers] [2237] branches/event_logging/db/migrate: Rename event_logging migrate scripts.
Date: Wed, 24 Jun 2009 12:55:24 -0400 (EDT)

Revision
2237
Author
dtm
Date
2009-06-24 12:55:23 -0400 (Wed, 24 Jun 2009)

Log Message

Rename event_logging migrate scripts.

Added Paths

Removed Paths

Diff

Deleted: branches/event_logging/db/migrate/077_create_activity_logs.rb (2236 => 2237)


--- branches/event_logging/db/migrate/077_create_activity_logs.rb	2009-06-24 16:18:50 UTC (rev 2236)
+++ branches/event_logging/db/migrate/077_create_activity_logs.rb	2009-06-24 16:55:23 UTC (rev 2237)
@@ -1,23 +0,0 @@
-class CreateActivityLogs < ActiveRecord::Migration
-  # original migration was suitable only for Rails2.0, so updated to
-  # work with Rails 1.2.6 as well
-  
-  def self.up
-    create_table :activity_logs do |t|
-      t.column :action, :string
-      t.column :activity_loggable_type, :string
-      t.column :activity_loggable_id, :integer
-      t.column :culprit_type, :string
-      t.column :culprit_id, :integer
-      t.column :referenced_type, :string
-      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
-
-  def self.down
-    drop_table :activity_logs
-  end
-end
\ No newline at end of file

Deleted: branches/event_logging/db/migrate/078_add_indexes_to_activity_log_table.rb (2236 => 2237)


--- branches/event_logging/db/migrate/078_add_indexes_to_activity_log_table.rb	2009-06-24 16:18:50 UTC (rev 2236)
+++ branches/event_logging/db/migrate/078_add_indexes_to_activity_log_table.rb	2009-06-24 16:55:23 UTC (rev 2237)
@@ -1,17 +0,0 @@
-class AddIndexesToActivityLogTable < ActiveRecord::Migration
-  def self.up
-
-    add_index :activity_logs, ["activity_loggable_id","activity_loggable_type"], :name => "activity_logs_activity_loggable_index"
-    add_index :activity_logs, ["referenced_id","referenced_type"], :name     => "activity_logs_referenced_index"
-    add_index :activity_logs, ["culprit_id","culprit_type"], :name =>     "activity_logs_culprit_index"
-
-  end
-
-  def self.down
-
-    remove_index :activity_logs, :name => "activity_logs_activity_loggable_index"
-    remove_index :activity_logs, :name => "activity_logs_referenced_index"
-    remove_index :activity_logs, :name => "activity_logs_culprit_index"
-
-  end
-end

Copied: branches/event_logging/db/migrate/081_create_activity_logs.rb (from rev 2235, branches/event_logging/db/migrate/077_create_activity_logs.rb) (0 => 2237)


--- branches/event_logging/db/migrate/081_create_activity_logs.rb	                        (rev 0)
+++ branches/event_logging/db/migrate/081_create_activity_logs.rb	2009-06-24 16:55:23 UTC (rev 2237)
@@ -0,0 +1,23 @@
+class CreateActivityLogs < ActiveRecord::Migration
+  # original migration was suitable only for Rails2.0, so updated to
+  # work with Rails 1.2.6 as well
+  
+  def self.up
+    create_table :activity_logs do |t|
+      t.column :action, :string
+      t.column :activity_loggable_type, :string
+      t.column :activity_loggable_id, :integer
+      t.column :culprit_type, :string
+      t.column :culprit_id, :integer
+      t.column :referenced_type, :string
+      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
+
+  def self.down
+    drop_table :activity_logs
+  end
+end
\ No newline at end of file

Copied: branches/event_logging/db/migrate/082_add_indexes_to_activity_log_table.rb (from rev 2235, branches/event_logging/db/migrate/078_add_indexes_to_activity_log_table.rb) (0 => 2237)


--- branches/event_logging/db/migrate/082_add_indexes_to_activity_log_table.rb	                        (rev 0)
+++ branches/event_logging/db/migrate/082_add_indexes_to_activity_log_table.rb	2009-06-24 16:55:23 UTC (rev 2237)
@@ -0,0 +1,17 @@
+class AddIndexesToActivityLogTable < ActiveRecord::Migration
+  def self.up
+
+    add_index :activity_logs, ["activity_loggable_id","activity_loggable_type"], :name => "activity_logs_activity_loggable_index"
+    add_index :activity_logs, ["referenced_id","referenced_type"], :name     => "activity_logs_referenced_index"
+    add_index :activity_logs, ["culprit_id","culprit_type"], :name =>     "activity_logs_culprit_index"
+
+  end
+
+  def self.down
+
+    remove_index :activity_logs, :name => "activity_logs_activity_loggable_index"
+    remove_index :activity_logs, :name => "activity_logs_referenced_index"
+    remove_index :activity_logs, :name => "activity_logs_culprit_index"
+
+  end
+end

reply via email to

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