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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
3845f12d
Commit
3845f12d
authored
Jul 21, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix migration to make it fast
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
479814b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
...721081015_drop_and_readd_has_external_wiki_in_projects.rb
+14
-0
No files found.
db/migrate/20160721081015_
nullify
_has_external_wiki_in_projects.rb
→
db/migrate/20160721081015_
drop_and_readd
_has_external_wiki_in_projects.rb
View file @
3845f12d
class
Nullify
HasExternalWikiInProjects
<
ActiveRecord
::
Migration
class
DropAndReadd
HasExternalWikiInProjects
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
DOWNTIME
=
false
def
up
def
up
execute
(
"UPDATE projects SET has_external_wiki = NULL"
)
remove_column
:projects
,
:has_external_wiki
,
:boolean
add_column
:projects
,
:has_external_wiki
,
:boolean
end
end
def
down
def
down
...
...
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