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
Léo-Paul Géneau
gitlab-ce
Commits
3fd4a37d
Commit
3fd4a37d
authored
Jun 21, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable transactions in migrations that should not use it
parent
e4d42a62
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
21 additions
and
0 deletions
+21
-0
db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb
db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb
+2
-0
db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
...721081015_drop_and_readd_has_external_wiki_in_projects.rb
+2
-0
db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb
...60901141443_set_confidential_issues_events_on_webhooks.rb
+2
-0
db/migrate/20160919144305_add_type_to_labels.rb
db/migrate/20160919144305_add_type_to_labels.rb
+2
-0
db/migrate/20161018124658_make_project_owners_masters.rb
db/migrate/20161018124658_make_project_owners_masters.rb
+2
-0
db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb
...2806_rename_slack_and_mattermost_notification_services.rb
+2
-0
db/post_migrate/20170309171644_reset_relative_position_for_issue.rb
...grate/20170309171644_reset_relative_position_for_issue.rb
+3
-0
db/post_migrate/20170317162059_update_upload_paths_to_system.rb
...t_migrate/20170317162059_update_upload_paths_to_system.rb
+2
-0
db/post_migrate/20170406142253_migrate_user_project_view.rb
db/post_migrate/20170406142253_migrate_user_project_view.rb
+2
-0
db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb
...0170508170547_add_head_pipeline_for_each_merge_request.rb
+2
-0
No files found.
db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb
View file @
3fd4a37d
...
...
@@ -2,6 +2,8 @@
class
SetMissingStageOnCiBuilds
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
def
up
update_column_in_batches
(
:ci_builds
,
:stage
,
:test
)
do
|
table
,
query
|
query
.
where
(
table
[
:stage
].
eq
(
nil
))
...
...
db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
View file @
3fd4a37d
...
...
@@ -5,6 +5,8 @@ class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
disable_ddl_transaction!
def
up
update_column_in_batches
(
:projects
,
:has_external_wiki
,
nil
)
do
|
table
,
query
|
query
.
where
(
table
[
:has_external_wiki
].
not_eq
(
nil
))
...
...
db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb
View file @
3fd4a37d
...
...
@@ -4,6 +4,8 @@ class SetConfidentialIssuesEventsOnWebhooks < ActiveRecord::Migration
DOWNTIME
=
false
disable_ddl_transaction!
def
up
update_column_in_batches
(
:web_hooks
,
:confidential_issues_events
,
true
)
do
|
table
,
query
|
query
.
where
(
table
[
:issues_events
].
eq
(
true
))
...
...
db/migrate/20160919144305_add_type_to_labels.rb
View file @
3fd4a37d
...
...
@@ -5,6 +5,8 @@ class AddTypeToLabels < ActiveRecord::Migration
DOWNTIME
=
true
DOWNTIME_REASON
=
'Labels will not work as expected until this migration is complete.'
disable_ddl_transaction!
def
change
add_column
:labels
,
:type
,
:string
...
...
db/migrate/20161018124658_make_project_owners_masters.rb
View file @
3fd4a37d
...
...
@@ -4,6 +4,8 @@ class MakeProjectOwnersMasters < ActiveRecord::Migration
DOWNTIME
=
false
disable_ddl_transaction!
def
up
update_column_in_batches
(
:members
,
:access_level
,
40
)
do
|
table
,
query
|
query
.
where
(
table
[
:access_level
].
eq
(
50
).
and
(
table
[
:source_type
].
eq
(
'Project'
)))
...
...
db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb
View file @
3fd4a37d
...
...
@@ -4,6 +4,8 @@ class RenameSlackAndMattermostNotificationServices < ActiveRecord::Migration
DOWNTIME
=
false
disable_ddl_transaction!
def
up
update_column_in_batches
(
:services
,
:type
,
'SlackService'
)
do
|
table
,
query
|
query
.
where
(
table
[
:type
].
eq
(
'SlackNotificationService'
))
...
...
db/post_migrate/20170309171644_reset_relative_position_for_issue.rb
View file @
3fd4a37d
...
...
@@ -4,6 +4,8 @@ class ResetRelativePositionForIssue < ActiveRecord::Migration
DOWNTIME
=
false
disable_ddl_transaction!
def
up
update_column_in_batches
(
:issues
,
:relative_position
,
nil
)
do
|
table
,
query
|
query
.
where
(
table
[
:relative_position
].
not_eq
(
nil
))
...
...
@@ -11,5 +13,6 @@ class ResetRelativePositionForIssue < ActiveRecord::Migration
end
def
down
# noop
end
end
db/post_migrate/20170317162059_update_upload_paths_to_system.rb
View file @
3fd4a37d
...
...
@@ -7,6 +7,8 @@ class UpdateUploadPathsToSystem < ActiveRecord::Migration
DOWNTIME
=
false
AFFECTED_MODELS
=
%w(User Project Note Namespace Appearance)
disable_ddl_transaction!
def
up
update_column_in_batches
(
:uploads
,
:path
,
replace_sql
(
arel_table
[
:path
],
base_directory
,
new_upload_dir
))
do
|
_table
,
query
|
query
.
where
(
uploads_to_switch_to_new_path
)
...
...
db/post_migrate/20170406142253_migrate_user_project_view.rb
View file @
3fd4a37d
...
...
@@ -7,6 +7,8 @@ class MigrateUserProjectView < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
disable_ddl_transaction!
def
up
update_column_in_batches
(
:users
,
:project_view
,
2
)
do
|
table
,
query
|
query
.
where
(
table
[
:project_view
].
eq
(
0
))
...
...
db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb
View file @
3fd4a37d
...
...
@@ -3,6 +3,8 @@ class AddHeadPipelineForEachMergeRequest < ActiveRecord::Migration
DOWNTIME
=
false
disable_ddl_transaction!
def
up
disable_statement_timeout
...
...
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