summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-04-12 16:13:24 +0100
committerRémy Coutable <remy@rymai.me>2017-04-14 15:20:55 +0200
commit380e40fee30d836e6dffb1e956df39033d43a671 (patch)
tree8258a84cb620aa707539730815cccc62ff8d0335 /db
parent00e9568e140165edcc091bd6729393cdeaac642b (diff)
downloadgitlab-ce-380e40fee30d836e6dffb1e956df39033d43a671.tar.gz
Remove unused user activities code
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20161007073613_create_user_activities.rb24
-rw-r--r--db/post_migrate/20161128170531_drop_user_activities_table.rb16
2 files changed, 3 insertions, 37 deletions
diff --git a/db/migrate/20161007073613_create_user_activities.rb b/db/migrate/20161007073613_create_user_activities.rb
index 4239cebd8f6..1d694e777a1 100644
--- a/db/migrate/20161007073613_create_user_activities.rb
+++ b/db/migrate/20161007073613_create_user_activities.rb
@@ -1,27 +1,7 @@
class CreateUserActivities < ActiveRecord::Migration
- # Set this constant to true if this migration requires downtime.
- DOWNTIME = true
-
- # When a migration requires downtime you **must** uncomment the following
- # constant and define a short and easy to understand explanation as to why the
- # migration requires downtime.
- DOWNTIME_REASON = 'Adding foreign key'
-
- # When using the methods "add_concurrent_index" or "add_column_with_default"
- # you must disable the use of transactions as these methods can not run in an
- # existing transaction. When using "add_concurrent_index" make sure that this
- # method is the _only_ method called in the migration, any other changes
- # should go in a separate migration. This ensures that upon failure _only_ the
- # index creation fails and can be retried or reverted easily.
- #
- # To disable transactions uncomment the following line and remove these
- # comments:
- # disable_ddl_transaction!
+ DOWNTIME = false
+ # This migration is a no-op. It just exists to match EE.
def change
- create_table :user_activities do |t|
- t.belongs_to :user, index: { unique: true }, foreign_key: { on_delete: :cascade }
- t.datetime :last_activity_at, null: false
- end
end
end
diff --git a/db/post_migrate/20161128170531_drop_user_activities_table.rb b/db/post_migrate/20161128170531_drop_user_activities_table.rb
index 3ece0722821..00bc0c73015 100644
--- a/db/post_migrate/20161128170531_drop_user_activities_table.rb
+++ b/db/post_migrate/20161128170531_drop_user_activities_table.rb
@@ -1,23 +1,9 @@
-# See http://doc.gitlab.com/ce/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
class DropUserActivitiesTable < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
- # When using the methods "add_concurrent_index" or "add_column_with_default"
- # you must disable the use of transactions as these methods can not run in an
- # existing transaction. When using "add_concurrent_index" make sure that this
- # method is the _only_ method called in the migration, any other changes
- # should go in a separate migration. This ensures that upon failure _only_ the
- # index creation fails and can be retried or reverted easily.
- #
- # To disable transactions uncomment the following line and remove these
- # comments:
- # disable_ddl_transaction!
-
+ # This migration is a no-op. It just exists to match EE.
def change
- drop_table :user_activities
end
end