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
e32c1a5c
Commit
e32c1a5c
authored
Mar 29, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ci_trigger_schedules table
parent
4c2435f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
db/migrate/20170329095907_create_ci_trigger_schedules.rb
db/migrate/20170329095907_create_ci_trigger_schedules.rb
+42
-0
db/schema.rb
db/schema.rb
+15
-0
No files found.
db/migrate/20170329095907_create_ci_trigger_schedules.rb
0 → 100644
View file @
e32c1a5c
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
CreateCiTriggerSchedules
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
# When a migration requires downtime you **must** uncomment the following
# constant and define a short and easy to understand explanation as to why the
# migration requires downtime.
# DOWNTIME_REASON = ''
# When using the methods "add_concurrent_index" or "add_column_with_default"
# you must disable the use of transactions as these methods can not run in an
# existing transaction. When using "add_concurrent_index" make sure that this
# method is the _only_ method called in the migration, any other changes
# should go in a separate migration. This ensures that upon failure _only_ the
# index creation fails and can be retried or reverted easily.
#
# To disable transactions uncomment the following line and remove these
# comments:
# disable_ddl_transaction!
def
change
create_table
:ci_trigger_schedules
do
|
t
|
t
.
integer
"project_id"
t
.
integer
"trigger_id"
,
null:
false
t
.
datetime
"deleted_at"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
string
"cron"
t
.
string
"cron_time_zone"
t
.
datetime
"next_run_at"
end
add_index
:ci_trigger_schedules
,
[
"next_run_at"
],
name:
"index_ci_trigger_schedules_on_next_run_at"
,
using: :btree
add_index
:ci_trigger_schedules
,
[
"project_id"
],
name:
"index_ci_trigger_schedules_on_project_id"
,
using: :btree
add_foreign_key
:ci_trigger_schedules
,
:ci_triggers
,
column: :trigger_id
,
on_delete: :cascade
end
end
db/schema.rb
View file @
e32c1a5c
...
...
@@ -300,6 +300,20 @@ ActiveRecord::Schema.define(version: 20170405080720) do
add_index
"ci_trigger_requests"
,
[
"commit_id"
],
name:
"index_ci_trigger_requests_on_commit_id"
,
using: :btree
create_table
"ci_trigger_schedules"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
t
.
integer
"trigger_id"
,
null:
false
t
.
datetime
"deleted_at"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
string
"cron"
t
.
string
"cron_time_zone"
t
.
datetime
"next_run_at"
end
add_index
"ci_trigger_schedules"
,
[
"next_run_at"
],
name:
"index_ci_trigger_schedules_on_next_run_at"
,
using: :btree
add_index
"ci_trigger_schedules"
,
[
"project_id"
],
name:
"index_ci_trigger_schedules_on_project_id"
,
using: :btree
create_table
"ci_triggers"
,
force: :cascade
do
|
t
|
t
.
string
"token"
t
.
datetime
"deleted_at"
...
...
@@ -1299,6 +1313,7 @@ ActiveRecord::Schema.define(version: 20170405080720) do
add_foreign_key
"boards"
,
"projects"
add_foreign_key
"chat_teams"
,
"namespaces"
,
on_delete: :cascade
add_foreign_key
"ci_trigger_schedules"
,
"ci_triggers"
,
column:
"trigger_id"
,
on_delete: :cascade
add_foreign_key
"ci_triggers"
,
"users"
,
column:
"owner_id"
,
name:
"fk_e8e10d1964"
,
on_delete: :cascade
add_foreign_key
"issue_metrics"
,
"issues"
,
on_delete: :cascade
add_foreign_key
"label_priorities"
,
"labels"
,
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