From f5c5292b3f8b708a97a68457a1c856eac2415e54 Mon Sep 17 00:00:00 2001 From: Jon Jensen Date: Tue, 16 Aug 2011 09:27:35 -0600 Subject: [PATCH] add columns for media comments so the user can be the context also fixed some migrations Change-Id: I8067f9d51328baaf566d32ea054f77bcead185dc Reviewed-on: https://gerrit.instructure.com/5094 Tested-by: Hudson Reviewed-by: Zach Wily --- db/migrate/20110405210006_web_conference_settings.rb | 2 +- db/migrate/20110601222447_conversation_tweaks.rb | 2 +- ...609212540_message_attachments_and_media_objects.rb | 8 ++++---- db/migrate/20110801080015_message_forwards.rb | 2 +- db/migrate/20110803192001_unread_counts.rb | 2 +- db/migrate/20110804195852_label_conversations.rb | 2 +- db/migrate/20110816152405_new_inbox_media_comments.rb | 11 +++++++++++ 7 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 db/migrate/20110816152405_new_inbox_media_comments.rb diff --git a/db/migrate/20110405210006_web_conference_settings.rb b/db/migrate/20110405210006_web_conference_settings.rb index c3f6df9080c..c4c10135c4d 100644 --- a/db/migrate/20110405210006_web_conference_settings.rb +++ b/db/migrate/20110405210006_web_conference_settings.rb @@ -4,6 +4,6 @@ class WebConferenceSettings < ActiveRecord::Migration end def self.down - drop_column :web_conferences, :settings + remove_column :web_conferences, :settings end end diff --git a/db/migrate/20110601222447_conversation_tweaks.rb b/db/migrate/20110601222447_conversation_tweaks.rb index 7be734b15f2..a925a6c9cff 100644 --- a/db/migrate/20110601222447_conversation_tweaks.rb +++ b/db/migrate/20110601222447_conversation_tweaks.rb @@ -4,6 +4,6 @@ class ConversationTweaks < ActiveRecord::Migration end def self.down - drop_column :conversation_participants, :last_authored_at + remove_column :conversation_participants, :last_authored_at end end diff --git a/db/migrate/20110609212540_message_attachments_and_media_objects.rb b/db/migrate/20110609212540_message_attachments_and_media_objects.rb index a36ed4dd2c5..22ec2044c91 100644 --- a/db/migrate/20110609212540_message_attachments_and_media_objects.rb +++ b/db/migrate/20110609212540_message_attachments_and_media_objects.rb @@ -7,9 +7,9 @@ class MessageAttachmentsAndMediaObjects < ActiveRecord::Migration end def self.down - drop_column :conversations, :has_attachments - drop_column :conversations, :has_media_objects - drop_column :conversation_participants, :has_attachments - drop_column :conversation_participants, :has_media_objects + remove_column :conversations, :has_attachments + remove_column :conversations, :has_media_objects + remove_column :conversation_participants, :has_attachments + remove_column :conversation_participants, :has_media_objects end end diff --git a/db/migrate/20110801080015_message_forwards.rb b/db/migrate/20110801080015_message_forwards.rb index 2ceff5386c9..e1ffef89f8c 100644 --- a/db/migrate/20110801080015_message_forwards.rb +++ b/db/migrate/20110801080015_message_forwards.rb @@ -4,6 +4,6 @@ class MessageForwards < ActiveRecord::Migration end def self.down - drop_column :conversation_messages, :forwarded_message_ids + remove_column :conversation_messages, :forwarded_message_ids end end diff --git a/db/migrate/20110803192001_unread_counts.rb b/db/migrate/20110803192001_unread_counts.rb index 098729daddc..3ff22762807 100644 --- a/db/migrate/20110803192001_unread_counts.rb +++ b/db/migrate/20110803192001_unread_counts.rb @@ -14,6 +14,6 @@ class UnreadCounts < ActiveRecord::Migration end def self.down - drop_column :users, :unread_conversations_count + remove_column :users, :unread_conversations_count end end diff --git a/db/migrate/20110804195852_label_conversations.rb b/db/migrate/20110804195852_label_conversations.rb index b8892865984..bbd4b0cc3a1 100644 --- a/db/migrate/20110804195852_label_conversations.rb +++ b/db/migrate/20110804195852_label_conversations.rb @@ -4,6 +4,6 @@ class LabelConversations < ActiveRecord::Migration end def self.down - drop_column :conversation_participants, :label + remove_column :conversation_participants, :label end end diff --git a/db/migrate/20110816152405_new_inbox_media_comments.rb b/db/migrate/20110816152405_new_inbox_media_comments.rb new file mode 100644 index 00000000000..0c8234bb30a --- /dev/null +++ b/db/migrate/20110816152405_new_inbox_media_comments.rb @@ -0,0 +1,11 @@ +class NewInboxMediaComments < ActiveRecord::Migration + def self.up + add_column :conversation_messages, :media_comment_id, :string + add_column :conversation_messages, :media_comment_type, :string + end + + def self.down + remove_column :conversation_messages, :media_comment_id + remove_column :conversation_messages, :media_comment_type + end +end