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
Jérome Perrin
gitlab-ce
Commits
8ac7f297
Commit
8ac7f297
authored
Sep 18, 2017
by
Zeger-Jan van de Weg
Committed by
Kamil Trzcinski
Dec 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create ci_artifacts table
parent
636376dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
3 deletions
+35
-3
db/migrate/20170918072948_create_artifacts.rb
db/migrate/20170918072948_create_artifacts.rb
+19
-3
db/schema.rb
db/schema.rb
+16
-0
No files found.
db/migrate/20170918072948_create_artifacts.rb
View file @
8ac7f297
class
CreateArtifacts
<
ActiveRecord
::
Migration
class
CreateArtifacts
<
ActiveRecord
::
Migration
def
change
def
up
create_table
:artifacts
do
|
t
|
create_table
:ci_artifacts
do
|
t
|
t
.
belongs_to
:project
,
null:
false
,
foreign_key:
{
on_delete: :cascade
}
t
.
belongs_to
:ci_build
,
null:
false
,
foreign_key:
{
on_delete: :cascade
}
t
.
integer
:size
,
limit:
8
,
default:
0
t
.
timestamps
null:
false
t
.
datetime_with_timezone
:created_at
,
null:
false
t
.
datetime_with_timezone
:updated_at
,
null:
false
t
.
datetime_with_timezone
:expire_at
t
.
integer
:erased_by_id
,
null:
false
t
.
datetime_with_timezone
:erased_at
t
.
text
:file
end
end
add_index
(
:ci_artifacts
,
[
:project_id
,
:ci_build_id
],
unique:
true
)
end
def
down
drop_table
(
:ci_artifacts
)
end
end
end
end
db/schema.rb
View file @
8ac7f297
...
@@ -226,6 +226,20 @@ ActiveRecord::Schema.define(version: 20171124150326) do
...
@@ -226,6 +226,20 @@ ActiveRecord::Schema.define(version: 20171124150326) do
add_index
"chat_teams"
,
[
"namespace_id"
],
name:
"index_chat_teams_on_namespace_id"
,
unique:
true
,
using: :btree
add_index
"chat_teams"
,
[
"namespace_id"
],
name:
"index_chat_teams_on_namespace_id"
,
unique:
true
,
using: :btree
create_table
"ci_artifacts"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
,
null:
false
t
.
integer
"ci_build_id"
,
null:
false
t
.
integer
"size"
,
limit:
8
,
default:
0
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
datetime
"expire_at"
t
.
integer
"erased_by_id"
,
null:
false
t
.
datetime
"erased_at"
t
.
text
"file"
end
add_index
"ci_artifacts"
,
[
"project_id"
,
"ci_build_id"
],
name:
"index_ci_artifacts_on_project_id_and_ci_build_id"
,
unique:
true
,
using: :btree
create_table
"ci_build_trace_section_names"
,
force: :cascade
do
|
t
|
create_table
"ci_build_trace_section_names"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
,
null:
false
t
.
integer
"project_id"
,
null:
false
t
.
string
"name"
,
null:
false
t
.
string
"name"
,
null:
false
...
@@ -1901,6 +1915,8 @@ ActiveRecord::Schema.define(version: 20171124150326) do
...
@@ -1901,6 +1915,8 @@ ActiveRecord::Schema.define(version: 20171124150326) do
add_foreign_key
"boards"
,
"projects"
,
name:
"fk_f15266b5f9"
,
on_delete: :cascade
add_foreign_key
"boards"
,
"projects"
,
name:
"fk_f15266b5f9"
,
on_delete: :cascade
add_foreign_key
"chat_teams"
,
"namespaces"
,
on_delete: :cascade
add_foreign_key
"chat_teams"
,
"namespaces"
,
on_delete: :cascade
add_foreign_key
"ci_artifacts"
,
"ci_builds"
,
on_delete: :cascade
add_foreign_key
"ci_artifacts"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"ci_build_trace_section_names"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"ci_build_trace_section_names"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"ci_build_trace_sections"
,
"ci_build_trace_section_names"
,
column:
"section_name_id"
,
name:
"fk_264e112c66"
,
on_delete: :cascade
add_foreign_key
"ci_build_trace_sections"
,
"ci_build_trace_section_names"
,
column:
"section_name_id"
,
name:
"fk_264e112c66"
,
on_delete: :cascade
add_foreign_key
"ci_build_trace_sections"
,
"ci_builds"
,
column:
"build_id"
,
name:
"fk_4ebe41f502"
,
on_delete: :cascade
add_foreign_key
"ci_build_trace_sections"
,
"ci_builds"
,
column:
"build_id"
,
name:
"fk_4ebe41f502"
,
on_delete: :cascade
...
...
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