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
3be23cd8
Commit
3be23cd8
authored
Dec 21, 2020
by
Thong Kuah
Committed by
Mayra Cabrera
Dec 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Autocorrect Ruby 2.7 keyword warnings in migrations
Autocorrect, then tidied up formatting
parent
1cf69f5d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
20 deletions
+21
-20
db/migrate/20190402150158_backport_enterprise_schema.rb
db/migrate/20190402150158_backport_enterprise_schema.rb
+2
-2
db/migrate/20190716144222_create_analytics_cycle_analytics_project_stages.rb
...144222_create_analytics_cycle_analytics_project_stages.rb
+7
-6
db/migrate/20190729062536_create_analytics_cycle_analytics_group_stages.rb
...29062536_create_analytics_cycle_analytics_group_stages.rb
+7
-6
db/migrate/20190910125852_create_analytics_language_trend_repository_languages.rb
...2_create_analytics_language_trend_repository_languages.rb
+3
-4
db/migrate/20200624142107_create_analytics_cycle_analytics_group_value_streams.rb
...7_create_analytics_cycle_analytics_group_value_streams.rb
+2
-2
No files found.
db/migrate/20190402150158_backport_enterprise_schema.rb
View file @
3be23cd8
...
@@ -198,9 +198,9 @@ class BackportEnterpriseSchema < ActiveRecord::Migration[5.0]
...
@@ -198,9 +198,9 @@ class BackportEnterpriseSchema < ActiveRecord::Migration[5.0]
# rubocop:enable Migration/DropTable
# rubocop:enable Migration/DropTable
end
end
def
add_column_with_default_if_not_exists
(
table
,
name
,
*
args
)
def
add_column_with_default_if_not_exists
(
table
,
name
,
type
,
*
*
args
)
unless
column_exists?
(
table
,
name
)
unless
column_exists?
(
table
,
name
)
add_column_with_default
(
table
,
name
,
*
args
)
# rubocop:disable Migration/AddColumnWithDefault
add_column_with_default
(
table
,
name
,
type
,
*
*
args
)
# rubocop:disable Migration/AddColumnWithDefault
end
end
end
end
...
...
db/migrate/20190716144222_create_analytics_cycle_analytics_project_stages.rb
View file @
3be23cd8
...
@@ -11,19 +11,20 @@ class CreateAnalyticsCycleAnalyticsProjectStages < ActiveRecord::Migration[5.2]
...
@@ -11,19 +11,20 @@ class CreateAnalyticsCycleAnalyticsProjectStages < ActiveRecord::Migration[5.2]
t
.
integer
:relative_position
t
.
integer
:relative_position
t
.
integer
:start_event_identifier
,
null:
false
t
.
integer
:start_event_identifier
,
null:
false
t
.
integer
:end_event_identifier
,
null:
false
t
.
integer
:end_event_identifier
,
null:
false
t
.
references
(
:project
,
{
t
.
references
(
:project
,
null:
false
,
null:
false
,
foreign_key:
{
to_table: :projects
,
on_delete: :cascade
},
foreign_key:
{
to_table: :projects
,
on_delete: :cascade
},
index:
{
name:
INDEX_PREFIX
+
'on_project_id'
}
index:
{
name:
INDEX_PREFIX
+
'on_project_id'
}
}
)
)
t
.
references
(
:start_event_label
,
{
t
.
references
(
:start_event_label
,
foreign_key:
{
to_table: :labels
,
on_delete: :cascade
},
foreign_key:
{
to_table: :labels
,
on_delete: :cascade
},
index:
{
name:
INDEX_PREFIX
+
'on_start_event_label_id'
}
index:
{
name:
INDEX_PREFIX
+
'on_start_event_label_id'
}
}
)
)
t
.
references
(
:end_event_label
,
{
t
.
references
(
:end_event_label
,
foreign_key:
{
to_table: :labels
,
on_delete: :cascade
},
foreign_key:
{
to_table: :labels
,
on_delete: :cascade
},
index:
{
name:
INDEX_PREFIX
+
'on_end_event_label_id'
}
index:
{
name:
INDEX_PREFIX
+
'on_end_event_label_id'
}
}
)
)
t
.
boolean
:hidden
,
default:
false
,
null:
false
t
.
boolean
:hidden
,
default:
false
,
null:
false
t
.
boolean
:custom
,
default:
true
,
null:
false
t
.
boolean
:custom
,
default:
true
,
null:
false
t
.
string
:name
,
null:
false
,
limit:
255
# rubocop:disable Migration/PreventStrings
t
.
string
:name
,
null:
false
,
limit:
255
# rubocop:disable Migration/PreventStrings
...
...
db/migrate/20190729062536_create_analytics_cycle_analytics_group_stages.rb
View file @
3be23cd8
...
@@ -11,19 +11,20 @@ class CreateAnalyticsCycleAnalyticsGroupStages < ActiveRecord::Migration[5.2]
...
@@ -11,19 +11,20 @@ class CreateAnalyticsCycleAnalyticsGroupStages < ActiveRecord::Migration[5.2]
t
.
integer
:relative_position
t
.
integer
:relative_position
t
.
integer
:start_event_identifier
,
null:
false
t
.
integer
:start_event_identifier
,
null:
false
t
.
integer
:end_event_identifier
,
null:
false
t
.
integer
:end_event_identifier
,
null:
false
t
.
references
(
:group
,
{
t
.
references
(
:group
,
null:
false
,
null:
false
,
foreign_key:
{
to_table: :namespaces
,
on_delete: :cascade
},
foreign_key:
{
to_table: :namespaces
,
on_delete: :cascade
},
index:
{
name:
INDEX_PREFIX
+
'on_group_id'
}
index:
{
name:
INDEX_PREFIX
+
'on_group_id'
}
}
)
)
t
.
references
(
:start_event_label
,
{
t
.
references
(
:start_event_label
,
foreign_key:
{
to_table: :labels
,
on_delete: :cascade
},
foreign_key:
{
to_table: :labels
,
on_delete: :cascade
},
index:
{
name:
INDEX_PREFIX
+
'on_start_event_label_id'
}
index:
{
name:
INDEX_PREFIX
+
'on_start_event_label_id'
}
}
)
)
t
.
references
(
:end_event_label
,
{
t
.
references
(
:end_event_label
,
foreign_key:
{
to_table: :labels
,
on_delete: :cascade
},
foreign_key:
{
to_table: :labels
,
on_delete: :cascade
},
index:
{
name:
INDEX_PREFIX
+
'on_end_event_label_id'
}
index:
{
name:
INDEX_PREFIX
+
'on_end_event_label_id'
}
}
)
)
t
.
boolean
:hidden
,
default:
false
,
null:
false
t
.
boolean
:hidden
,
default:
false
,
null:
false
t
.
boolean
:custom
,
default:
true
,
null:
false
t
.
boolean
:custom
,
default:
true
,
null:
false
t
.
string
:name
,
null:
false
,
limit:
255
# rubocop:disable Migration/PreventStrings
t
.
string
:name
,
null:
false
,
limit:
255
# rubocop:disable Migration/PreventStrings
...
...
db/migrate/20190910125852_create_analytics_language_trend_repository_languages.rb
View file @
3be23cd8
...
@@ -7,16 +7,15 @@ class CreateAnalyticsLanguageTrendRepositoryLanguages < ActiveRecord::Migration[
...
@@ -7,16 +7,15 @@ class CreateAnalyticsLanguageTrendRepositoryLanguages < ActiveRecord::Migration[
def
change
def
change
create_table
:analytics_language_trend_repository_languages
,
id:
false
do
|
t
|
create_table
:analytics_language_trend_repository_languages
,
id:
false
do
|
t
|
t
.
integer
:file_count
,
null:
false
,
default:
0
t
.
integer
:file_count
,
null:
false
,
default:
0
t
.
references
:programming_language
,
{
t
.
references
:programming_language
,
null:
false
,
null:
false
,
foreign_key:
{
on_delete: :cascade
},
foreign_key:
{
on_delete: :cascade
},
index:
false
index:
false
}
t
.
references
:project
,
t
.
references
:project
,
{
null:
false
,
null:
false
,
foreign_key:
{
on_delete: :cascade
},
foreign_key:
{
on_delete: :cascade
},
index:
{
name:
INDEX_PREFIX
+
'on_project_id'
}
index:
{
name:
INDEX_PREFIX
+
'on_project_id'
}
}
t
.
integer
:loc
,
null:
false
,
default:
0
t
.
integer
:loc
,
null:
false
,
default:
0
t
.
integer
:bytes
,
null:
false
,
default:
0
t
.
integer
:bytes
,
null:
false
,
default:
0
# Storing percentage (with 2 decimal places), on 2 bytes.
# Storing percentage (with 2 decimal places), on 2 bytes.
...
...
db/migrate/20200624142107_create_analytics_cycle_analytics_group_value_streams.rb
View file @
3be23cd8
...
@@ -13,11 +13,11 @@ class CreateAnalyticsCycleAnalyticsGroupValueStreams < ActiveRecord::Migration[6
...
@@ -13,11 +13,11 @@ class CreateAnalyticsCycleAnalyticsGroupValueStreams < ActiveRecord::Migration[6
with_lock_retries
do
with_lock_retries
do
create_table
:analytics_cycle_analytics_group_value_streams
do
|
t
|
create_table
:analytics_cycle_analytics_group_value_streams
do
|
t
|
t
.
timestamps_with_timezone
t
.
timestamps_with_timezone
t
.
references
(
:group
,
{
t
.
references
(
:group
,
null:
false
,
null:
false
,
index:
false
,
index:
false
,
foreign_key:
{
to_table: :namespaces
,
on_delete: :cascade
}
foreign_key:
{
to_table: :namespaces
,
on_delete: :cascade
}
}
)
)
t
.
text
:name
,
null:
false
t
.
text
:name
,
null:
false
t
.
index
[
:group_id
,
:name
],
unique:
true
,
name:
INDEX_NAME
t
.
index
[
:group_id
,
:name
],
unique:
true
,
name:
INDEX_NAME
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