debian-mirror-gitlab/db/migrate/20170425112128_create_pipeline_schedules_table.rb

30 lines
698 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
# rubocop:disable Migration/Timestamps
2018-12-23 12:14:25 +05:30
class CreatePipelineSchedulesTable < ActiveRecord::Migration[4.2]
2017-08-17 22:00:37 +05:30
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
create_table :ci_pipeline_schedules do |t|
t.string :description
t.string :ref
t.string :cron
t.string :cron_timezone
t.datetime :next_run_at
t.integer :project_id
t.integer :owner_id
t.boolean :active, default: true
t.datetime :deleted_at
2018-03-17 18:26:18 +05:30
t.timestamps null: true
2017-08-17 22:00:37 +05:30
end
add_index(:ci_pipeline_schedules, :project_id)
add_index(:ci_pipeline_schedules, [:next_run_at, :active])
end
def down
drop_table :ci_pipeline_schedules
end
end