2017-06-13 07:44:13 -04:00
|
|
|
# rubocop:disable Migration/Datetime
|
2017-03-29 06:07:25 -04:00
|
|
|
class CreateCiTriggerSchedules < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
2017-04-04 12:54:45 -04:00
|
|
|
def change
|
2017-03-29 06:07:25 -04:00
|
|
|
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"
|
2017-04-04 12:54:45 -04:00
|
|
|
t.string "cron_timezone"
|
2017-03-29 06:07:25 -04:00
|
|
|
t.datetime "next_run_at"
|
|
|
|
end
|
|
|
|
|
2017-04-04 12:54:45 -04:00
|
|
|
add_index :ci_trigger_schedules, :next_run_at
|
|
|
|
add_index :ci_trigger_schedules, :project_id
|
2017-03-29 06:07:25 -04:00
|
|
|
end
|
|
|
|
end
|