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
f88d9cee
Commit
f88d9cee
authored
Sep 28, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix migrations
parent
0e338147
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
32 deletions
+15
-32
db/migrate/20150924125150_add_project_id_to_ci_commit.rb
db/migrate/20150924125150_add_project_id_to_ci_commit.rb
+5
-0
db/migrate/20150924125150_add_project_id_to_ci_tables.rb
db/migrate/20150924125150_add_project_id_to_ci_tables.rb
+0
-12
db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb
...grate/20150924125436_migrate_project_id_for_ci_commits.rb
+10
-0
db/migrate/20150924125436_migrate_project_id_for_ci_tables.rb
...igrate/20150924125436_migrate_project_id_for_ci_tables.rb
+0
-15
db/migrate/20150924131004_add_ci_fields_to_projects_table.rb
db/migrate/20150924131004_add_ci_fields_to_projects_table.rb
+0
-5
No files found.
db/migrate/20150924125150_add_project_id_to_ci_commit.rb
0 → 100644
View file @
f88d9cee
class
AddProjectIdToCiCommit
<
ActiveRecord
::
Migration
def
up
add_column
:ci_commits
,
:gl_project_id
,
:integer
end
end
db/migrate/20150924125150_add_project_id_to_ci_tables.rb
deleted
100644 → 0
View file @
0e338147
class
AddProjectIdToCiTables
<
ActiveRecord
::
Migration
def
up
add_column
:ci_builds
,
:gl_project_id
,
:integer
add_column
:ci_commits
,
:gl_project_id
,
:integer
add_column
:ci_events
,
:gl_project_id
,
:integer
add_column
:ci_runner_projects
,
:gl_project_id
,
:integer
add_column
:ci_services
,
:gl_project_id
,
:integer
add_column
:ci_triggers
,
:gl_project_id
,
:integer
add_column
:ci_variables
,
:gl_project_id
,
:integer
add_column
:ci_web_hooks
,
:gl_project_id
,
:integer
end
end
db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb
0 → 100644
View file @
f88d9cee
class
MigrateProjectIdForCiCommits
<
ActiveRecord
::
Migration
def
up
execute
(
"UPDATE ci_commits "
+
"JOIN ci_projects ON ci_projects.id = ci_commits.project_id "
+
"SET gl_project_id=ci_projects.gitlab_id "
+
"WHERE gl_project_id IS NULL"
)
end
end
db/migrate/20150924125436_migrate_project_id_for_ci_tables.rb
deleted
100644 → 0
View file @
0e338147
class
MigrateProjectIdForCiTables
<
ActiveRecord
::
Migration
TABLES
=
%w(ci_builds ci_commits ci_events ci_runner_projects
ci_services ci_triggers ci_variables ci_web_hooks)
def
up
TABLES
.
each
do
|
table
|
execute
(
"UPDATE
#{
table
}
"
+
"JOIN ci_projects ON ci_projects.id =
#{
table
}
.project_id "
+
"SET gl_project_id=ci_projects.gitlab_id "
+
"WHERE gl_project_id IS NULL"
)
end
end
end
db/migrate/20150924131004_add_ci_fields_to_projects_table.rb
deleted
100644 → 0
View file @
0e338147
class
AddCiFieldsToProjectsTable
<
ActiveRecord
::
Migration
def
up
add_column
:projects
,
:shared_runners_enabled
,
:boolean
,
default:
false
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