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
e5b48221
Commit
e5b48221
authored
Dec 19, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix migrations
parent
b5b9b321
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
5 deletions
+15
-5
db/migrate/20161202152038_create_table_namespace_metrics.rb
db/migrate/20161202152038_create_table_namespace_metrics.rb
+1
-1
db/migrate/20161202152039_create_table_project_metrics.rb
db/migrate/20161202152039_create_table_project_metrics.rb
+1
-1
db/migrate/20161202152041_add_index_to_project_metrics.rb
db/migrate/20161202152041_add_index_to_project_metrics.rb
+1
-1
db/schema.rb
db/schema.rb
+11
-1
spec/factories/namespaces.rb
spec/factories/namespaces.rb
+1
-1
No files found.
db/migrate/20161202152038_create_table_namespace_metrics.rb
View file @
e5b48221
...
...
@@ -5,7 +5,7 @@ class CreateTableNamespaceMetrics < ActiveRecord::Migration
def
change
create_table
:namespace_metrics
do
|
t
|
t
.
integer
:namespace_id
,
null:
false
,
unique:
true
t
.
integer
:namespace_id
,
null:
false
t
.
integer
:shared_runners_minutes
,
default:
0
,
null:
false
t
.
timestamp
:shared_runners_minutes_last_reset
end
...
...
db/migrate/20161202152039_create_table_project_metrics.rb
View file @
e5b48221
...
...
@@ -5,7 +5,7 @@ class CreateTableProjectMetrics < ActiveRecord::Migration
def
change
create_table
:project_metrics
do
|
t
|
t
.
integer
:project_id
,
null:
false
,
unique:
true
t
.
integer
:project_id
,
null:
false
t
.
integer
:shared_runners_minutes
,
default:
0
,
null:
false
t
.
timestamp
:shared_runners_minutes_last_reset
end
...
...
db/migrate/2016120215204
0
_add_index_to_project_metrics.rb
→
db/migrate/2016120215204
1
_add_index_to_project_metrics.rb
View file @
e5b48221
class
AddIndexTo
Namespace
Metrics
<
ActiveRecord
::
Migration
class
AddIndexTo
Project
Metrics
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
...
...
db/schema.rb
View file @
e5b48221
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201612021520
39
)
do
ActiveRecord
::
Schema
.
define
(
version:
201612021520
41
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -822,6 +822,7 @@ ActiveRecord::Schema.define(version: 20161202152039) do
create_table
"namespace_metrics"
,
force: :cascade
do
|
t
|
t
.
integer
"namespace_id"
,
null:
false
t
.
integer
"shared_runners_minutes"
,
default:
0
,
null:
false
t
.
datetime
"shared_runners_minutes_last_reset"
end
add_index
"namespace_metrics"
,
[
"namespace_id"
],
name:
"index_namespace_metrics_on_namespace_id"
,
unique:
true
,
using: :btree
...
...
@@ -1033,6 +1034,14 @@ ActiveRecord::Schema.define(version: 20161202152039) do
add_index
"project_import_data"
,
[
"project_id"
],
name:
"index_project_import_data_on_project_id"
,
using: :btree
create_table
"project_metrics"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
,
null:
false
t
.
integer
"shared_runners_minutes"
,
default:
0
,
null:
false
t
.
datetime
"shared_runners_minutes_last_reset"
end
add_index
"project_metrics"
,
[
"project_id"
],
name:
"index_project_metrics_on_project_id"
,
unique:
true
,
using: :btree
create_table
"projects"
,
force: :cascade
do
|
t
|
t
.
string
"name"
t
.
string
"path"
...
...
@@ -1493,6 +1502,7 @@ ActiveRecord::Schema.define(version: 20161202152039) do
add_foreign_key
"personal_access_tokens"
,
"users"
add_foreign_key
"project_authorizations"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"project_authorizations"
,
"users"
,
on_delete: :cascade
add_foreign_key
"project_metrics"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"protected_branch_merge_access_levels"
,
"namespaces"
,
column:
"group_id"
add_foreign_key
"protected_branch_merge_access_levels"
,
"protected_branches"
add_foreign_key
"protected_branch_merge_access_levels"
,
"users"
...
...
spec/factories/namespaces.rb
View file @
e5b48221
...
...
@@ -9,7 +9,7 @@ FactoryGirl.define do
end
trait
:with_used_limit
do
namespace_metrics
factory: :namespace_metrics
,
:with_used_limit
namespace_metrics
factory: :namespace_metrics
,
shared_runners_minutes:
1000
shared_runners_minutes_limit
500
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