summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-22 19:00:21 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-22 19:00:21 -0400
commit5c6d6dca48bf3d54f145e859e6d4c8b1befe1f09 (patch)
treecaeace01060fc7825c62db009d1886cab2b79f9b /db/migrate
parent7bb14aca1a6881e37c4bc6c1bd89fc2f126386db (diff)
parente44115cf206804f7a22c5f98ba422d9c61ad81a7 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20140422172559_create_simple_captcha_data.rb (renamed from db/migrate/20140422155038_create_simple_captcha_data.rb)0
-rw-r--r--db/migrate/20140422212555_create_mailboxer.mailboxer_engine.rb62
-rw-r--r--db/migrate/20140422212556_add_notified_object.mailboxer_engine.rb18
-rw-r--r--db/migrate/20140422212557_add_notification_code.mailboxer_engine.rb14
-rw-r--r--db/migrate/20140422212558_add_attachments.mailboxer_engine.rb10
-rw-r--r--db/migrate/20140422212559_rename_receipts_read.mailboxer_engine.rb10
-rw-r--r--db/migrate/20140422212560_add_global_notification_support.mailboxer_engine.rb10
-rw-r--r--db/migrate/20140422212602_create_delayed_jobs.rb (renamed from db/migrate/20140422195042_create_delayed_jobs.rb)0
-rw-r--r--db/migrate/20140422212605_create_servers.rb (renamed from db/migrate/20140422195045_create_servers.rb)0
-rw-r--r--db/migrate/20140422212609_create_matches.rb (renamed from db/migrate/20140422195049_create_matches.rb)0
-rw-r--r--db/migrate/20140422212613_create_teams.rb (renamed from db/migrate/20140422195052_create_teams.rb)0
-rw-r--r--db/migrate/20140422212616_create_alerts.rb (renamed from db/migrate/20140422195056_create_alerts.rb)0
-rw-r--r--db/migrate/20140422212619_create_pms.rb (renamed from db/migrate/20140422195059_create_pms.rb)0
-rw-r--r--db/migrate/20140422212623_create_tournaments.rb (renamed from db/migrate/20140422195103_create_tournaments.rb)0
-rw-r--r--db/migrate/20140422212627_create_games.rb (renamed from db/migrate/20140422195107_create_games.rb)0
-rw-r--r--db/migrate/20140422212630_create_users.rb (renamed from db/migrate/20140422195110_create_users.rb)0
-rw-r--r--db/migrate/20140422212634_create_sessions.rb (renamed from db/migrate/20140422195114_create_sessions.rb)0
-rw-r--r--db/migrate/20140422212637_create_brackets.rb (renamed from db/migrate/20140422195118_create_brackets.rb)0
-rw-r--r--db/migrate/20140422212641_create_game_settings.rb (renamed from db/migrate/20140422195121_create_game_settings.rb)0
-rw-r--r--db/migrate/20140422212644_create_tournament_settings.rb (renamed from db/migrate/20140422195125_create_tournament_settings.rb)0
-rw-r--r--db/migrate/20140422212648_create_tournament_stages.rb (renamed from db/migrate/20140422195128_create_tournament_stages.rb)0
-rw-r--r--db/migrate/20140422212651_create_statistics.rb (renamed from db/migrate/20140422195132_create_statistics.rb)0
-rw-r--r--db/migrate/20140422212654_create_remote_usernames.rb (renamed from db/migrate/20140422195135_create_remote_usernames.rb)0
-rw-r--r--db/migrate/20140422212657_create_bracket_matches.rb (renamed from db/migrate/20140422195139_create_bracket_matches.rb)0
-rw-r--r--db/migrate/20140422212701_create_api_requests.rb (renamed from db/migrate/20140422195143_create_api_requests.rb)0
-rw-r--r--db/migrate/20140422212704_create_tournament_players_join_table.rb (renamed from db/migrate/20140422195146_create_tournament_players_join_table.rb)0
-rw-r--r--db/migrate/20140422212707_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140422195150_create_tournament_hosts_join_table.rb)0
-rw-r--r--db/migrate/20140422212711_create_team_user_join_table.rb (renamed from db/migrate/20140422195153_create_team_user_join_table.rb)0
-rw-r--r--db/migrate/20140422212714_create_match_team_join_table.rb (renamed from db/migrate/20140422195157_create_match_team_join_table.rb)0
-rw-r--r--db/migrate/20140422212727_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140422195211_add_hidden_attrs_to_user.rb)0
30 files changed, 124 insertions, 0 deletions
diff --git a/db/migrate/20140422155038_create_simple_captcha_data.rb b/db/migrate/20140422172559_create_simple_captcha_data.rb
index 4573b20..4573b20 100644
--- a/db/migrate/20140422155038_create_simple_captcha_data.rb
+++ b/db/migrate/20140422172559_create_simple_captcha_data.rb
diff --git a/db/migrate/20140422212555_create_mailboxer.mailboxer_engine.rb b/db/migrate/20140422212555_create_mailboxer.mailboxer_engine.rb
new file mode 100644
index 0000000..690cec2
--- /dev/null
+++ b/db/migrate/20140422212555_create_mailboxer.mailboxer_engine.rb
@@ -0,0 +1,62 @@
+# This migration comes from mailboxer_engine (originally 20110511145103)
+class CreateMailboxer < ActiveRecord::Migration
+ def self.up
+ #Tables
+ #Conversations
+ create_table :conversations do |t|
+ t.column :subject, :string, :default => ""
+ t.column :created_at, :datetime, :null => false
+ t.column :updated_at, :datetime, :null => false
+ end
+ #Receipts
+ create_table :receipts do |t|
+ t.references :receiver, :polymorphic => true
+ t.column :notification_id, :integer, :null => false
+ t.column :read, :boolean, :default => false
+ t.column :trashed, :boolean, :default => false
+ t.column :deleted, :boolean, :default => false
+ t.column :mailbox_type, :string, :limit => 25
+ t.column :created_at, :datetime, :null => false
+ t.column :updated_at, :datetime, :null => false
+ end
+ #Notifications and Messages
+ create_table :notifications do |t|
+ t.column :type, :string
+ t.column :body, :text
+ t.column :subject, :string, :default => ""
+ t.references :sender, :polymorphic => true
+ t.references :object, :polymorphic => true
+ t.column :conversation_id, :integer
+ t.column :draft, :boolean, :default => false
+ t.column :updated_at, :datetime, :null => false
+ t.column :created_at, :datetime, :null => false
+ end
+
+
+ #Indexes
+ #Conversations
+ #Receipts
+ add_index "receipts","notification_id"
+
+ #Messages
+ add_index "notifications","conversation_id"
+
+ #Foreign keys
+ #Conversations
+ #Receipts
+ add_foreign_key "receipts", "notifications", :name => "receipts_on_notification_id"
+ #Messages
+ add_foreign_key "notifications", "conversations", :name => "notifications_on_conversation_id"
+ end
+
+ def self.down
+ #Tables
+ remove_foreign_key "receipts", :name => "receipts_on_notification_id"
+ remove_foreign_key "notifications", :name => "notifications_on_conversation_id"
+
+ #Indexes
+ drop_table :receipts
+ drop_table :conversations
+ drop_table :notifications
+ end
+end
diff --git a/db/migrate/20140422212556_add_notified_object.mailboxer_engine.rb b/db/migrate/20140422212556_add_notified_object.mailboxer_engine.rb
new file mode 100644
index 0000000..7f41ac6
--- /dev/null
+++ b/db/migrate/20140422212556_add_notified_object.mailboxer_engine.rb
@@ -0,0 +1,18 @@
+# This migration comes from mailboxer_engine (originally 20110719110700)
+class AddNotifiedObject < ActiveRecord::Migration
+ def self.up
+ change_table :notifications do |t|
+ t.references :notified_object, :polymorphic => true
+ t.remove :object_id
+ t.remove :object_type
+ end
+ end
+
+ def self.down
+ change_table :notifications do |t|
+ t.remove :notified_object_id
+ t.remove :notified_object_type
+ t.references :object, :polymorphic => true
+ end
+ end
+end
diff --git a/db/migrate/20140422212557_add_notification_code.mailboxer_engine.rb b/db/migrate/20140422212557_add_notification_code.mailboxer_engine.rb
new file mode 100644
index 0000000..04c12ef
--- /dev/null
+++ b/db/migrate/20140422212557_add_notification_code.mailboxer_engine.rb
@@ -0,0 +1,14 @@
+# This migration comes from mailboxer_engine (originally 20110912163911)
+class AddNotificationCode < ActiveRecord::Migration
+ def self.up
+ change_table :notifications do |t|
+ t.string :notification_code, :default => nil
+ end
+ end
+
+ def self.down
+ change_table :notifications do |t|
+ t.remove :notification_code
+ end
+ end
+end \ No newline at end of file
diff --git a/db/migrate/20140422212558_add_attachments.mailboxer_engine.rb b/db/migrate/20140422212558_add_attachments.mailboxer_engine.rb
new file mode 100644
index 0000000..b8d6588
--- /dev/null
+++ b/db/migrate/20140422212558_add_attachments.mailboxer_engine.rb
@@ -0,0 +1,10 @@
+# This migration comes from mailboxer_engine (originally 20111204163911)
+class AddAttachments < ActiveRecord::Migration
+ def self.up
+ add_column :notifications, :attachment, :string
+ end
+
+ def self.down
+ remove_column :notifications, :attachment
+ end
+end
diff --git a/db/migrate/20140422212559_rename_receipts_read.mailboxer_engine.rb b/db/migrate/20140422212559_rename_receipts_read.mailboxer_engine.rb
new file mode 100644
index 0000000..9ce904f
--- /dev/null
+++ b/db/migrate/20140422212559_rename_receipts_read.mailboxer_engine.rb
@@ -0,0 +1,10 @@
+# This migration comes from mailboxer_engine (originally 20120813110712)
+class RenameReceiptsRead < ActiveRecord::Migration
+ def up
+ rename_column :receipts, :read, :is_read
+ end
+
+ def down
+ rename_column :receipts, :is_read, :read
+ end
+end
diff --git a/db/migrate/20140422212560_add_global_notification_support.mailboxer_engine.rb b/db/migrate/20140422212560_add_global_notification_support.mailboxer_engine.rb
new file mode 100644
index 0000000..60f67ab
--- /dev/null
+++ b/db/migrate/20140422212560_add_global_notification_support.mailboxer_engine.rb
@@ -0,0 +1,10 @@
+# This migration comes from mailboxer_engine (originally 20130305144212)
+class AddGlobalNotificationSupport < ActiveRecord::Migration
+
+ def change
+ change_table :notifications do |t|
+ t.boolean :global, default: false
+ t.datetime :expires
+ end
+ end
+end
diff --git a/db/migrate/20140422195042_create_delayed_jobs.rb b/db/migrate/20140422212602_create_delayed_jobs.rb
index ec0dd93..ec0dd93 100644
--- a/db/migrate/20140422195042_create_delayed_jobs.rb
+++ b/db/migrate/20140422212602_create_delayed_jobs.rb
diff --git a/db/migrate/20140422195045_create_servers.rb b/db/migrate/20140422212605_create_servers.rb
index fbe1b02..fbe1b02 100644
--- a/db/migrate/20140422195045_create_servers.rb
+++ b/db/migrate/20140422212605_create_servers.rb
diff --git a/db/migrate/20140422195049_create_matches.rb b/db/migrate/20140422212609_create_matches.rb
index bac92d1..bac92d1 100644
--- a/db/migrate/20140422195049_create_matches.rb
+++ b/db/migrate/20140422212609_create_matches.rb
diff --git a/db/migrate/20140422195052_create_teams.rb b/db/migrate/20140422212613_create_teams.rb
index dd8397d..dd8397d 100644
--- a/db/migrate/20140422195052_create_teams.rb
+++ b/db/migrate/20140422212613_create_teams.rb
diff --git a/db/migrate/20140422195056_create_alerts.rb b/db/migrate/20140422212616_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140422195056_create_alerts.rb
+++ b/db/migrate/20140422212616_create_alerts.rb
diff --git a/db/migrate/20140422195059_create_pms.rb b/db/migrate/20140422212619_create_pms.rb
index 93bb5c6..93bb5c6 100644
--- a/db/migrate/20140422195059_create_pms.rb
+++ b/db/migrate/20140422212619_create_pms.rb
diff --git a/db/migrate/20140422195103_create_tournaments.rb b/db/migrate/20140422212623_create_tournaments.rb
index 716871f..716871f 100644
--- a/db/migrate/20140422195103_create_tournaments.rb
+++ b/db/migrate/20140422212623_create_tournaments.rb
diff --git a/db/migrate/20140422195107_create_games.rb b/db/migrate/20140422212627_create_games.rb
index 46ed30d..46ed30d 100644
--- a/db/migrate/20140422195107_create_games.rb
+++ b/db/migrate/20140422212627_create_games.rb
diff --git a/db/migrate/20140422195110_create_users.rb b/db/migrate/20140422212630_create_users.rb
index 8032870..8032870 100644
--- a/db/migrate/20140422195110_create_users.rb
+++ b/db/migrate/20140422212630_create_users.rb
diff --git a/db/migrate/20140422195114_create_sessions.rb b/db/migrate/20140422212634_create_sessions.rb
index f667f1e..f667f1e 100644
--- a/db/migrate/20140422195114_create_sessions.rb
+++ b/db/migrate/20140422212634_create_sessions.rb
diff --git a/db/migrate/20140422195118_create_brackets.rb b/db/migrate/20140422212637_create_brackets.rb
index 8813bf2..8813bf2 100644
--- a/db/migrate/20140422195118_create_brackets.rb
+++ b/db/migrate/20140422212637_create_brackets.rb
diff --git a/db/migrate/20140422195121_create_game_settings.rb b/db/migrate/20140422212641_create_game_settings.rb
index 06fb72e..06fb72e 100644
--- a/db/migrate/20140422195121_create_game_settings.rb
+++ b/db/migrate/20140422212641_create_game_settings.rb
diff --git a/db/migrate/20140422195125_create_tournament_settings.rb b/db/migrate/20140422212644_create_tournament_settings.rb
index e56697f..e56697f 100644
--- a/db/migrate/20140422195125_create_tournament_settings.rb
+++ b/db/migrate/20140422212644_create_tournament_settings.rb
diff --git a/db/migrate/20140422195128_create_tournament_stages.rb b/db/migrate/20140422212648_create_tournament_stages.rb
index e3668cb..e3668cb 100644
--- a/db/migrate/20140422195128_create_tournament_stages.rb
+++ b/db/migrate/20140422212648_create_tournament_stages.rb
diff --git a/db/migrate/20140422195132_create_statistics.rb b/db/migrate/20140422212651_create_statistics.rb
index cc2e97d..cc2e97d 100644
--- a/db/migrate/20140422195132_create_statistics.rb
+++ b/db/migrate/20140422212651_create_statistics.rb
diff --git a/db/migrate/20140422195135_create_remote_usernames.rb b/db/migrate/20140422212654_create_remote_usernames.rb
index e265985..e265985 100644
--- a/db/migrate/20140422195135_create_remote_usernames.rb
+++ b/db/migrate/20140422212654_create_remote_usernames.rb
diff --git a/db/migrate/20140422195139_create_bracket_matches.rb b/db/migrate/20140422212657_create_bracket_matches.rb
index 3323e31..3323e31 100644
--- a/db/migrate/20140422195139_create_bracket_matches.rb
+++ b/db/migrate/20140422212657_create_bracket_matches.rb
diff --git a/db/migrate/20140422195143_create_api_requests.rb b/db/migrate/20140422212701_create_api_requests.rb
index 544c330..544c330 100644
--- a/db/migrate/20140422195143_create_api_requests.rb
+++ b/db/migrate/20140422212701_create_api_requests.rb
diff --git a/db/migrate/20140422195146_create_tournament_players_join_table.rb b/db/migrate/20140422212704_create_tournament_players_join_table.rb
index be240e8..be240e8 100644
--- a/db/migrate/20140422195146_create_tournament_players_join_table.rb
+++ b/db/migrate/20140422212704_create_tournament_players_join_table.rb
diff --git a/db/migrate/20140422195150_create_tournament_hosts_join_table.rb b/db/migrate/20140422212707_create_tournament_hosts_join_table.rb
index 7521d89..7521d89 100644
--- a/db/migrate/20140422195150_create_tournament_hosts_join_table.rb
+++ b/db/migrate/20140422212707_create_tournament_hosts_join_table.rb
diff --git a/db/migrate/20140422195153_create_team_user_join_table.rb b/db/migrate/20140422212711_create_team_user_join_table.rb
index f3b57fc..f3b57fc 100644
--- a/db/migrate/20140422195153_create_team_user_join_table.rb
+++ b/db/migrate/20140422212711_create_team_user_join_table.rb
diff --git a/db/migrate/20140422195157_create_match_team_join_table.rb b/db/migrate/20140422212714_create_match_team_join_table.rb
index c2ed1b7..c2ed1b7 100644
--- a/db/migrate/20140422195157_create_match_team_join_table.rb
+++ b/db/migrate/20140422212714_create_match_team_join_table.rb
diff --git a/db/migrate/20140422195211_add_hidden_attrs_to_user.rb b/db/migrate/20140422212727_add_hidden_attrs_to_user.rb
index 9b5c505..9b5c505 100644
--- a/db/migrate/20140422195211_add_hidden_attrs_to_user.rb
+++ b/db/migrate/20140422212727_add_hidden_attrs_to_user.rb