Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3793c094
Commit
3793c094
authored
Mar 17, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make db/post_migrate/20161128170531_drop_user_activities_table.rb rollbackable
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
3f5d5001
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
db/post_migrate/20161128170531_drop_user_activities_table.rb
db/post_migrate/20161128170531_drop_user_activities_table.rb
+13
-2
No files found.
db/post_migrate/20161128170531_drop_user_activities_table.rb
View file @
3793c094
...
@@ -17,7 +17,18 @@ class DropUserActivitiesTable < ActiveRecord::Migration
...
@@ -17,7 +17,18 @@ class DropUserActivitiesTable < ActiveRecord::Migration
# comments:
# comments:
# disable_ddl_transaction!
# disable_ddl_transaction!
def
change
def
up
drop_table
:user_activities
drop_table
:user_activities
if
table_exists?
(
:user_activities
)
end
def
down
unless
table_exists?
(
:user_activities
)
create_table
"user_activities"
,
force: :cascade
do
|
t
|
t
.
integer
"user_id"
t
.
datetime
"last_activity_at"
,
null:
false
end
add_index
"user_activities"
,
[
"user_id"
],
name:
"index_user_activities_on_user_id"
,
unique:
true
,
using: :btree
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment