Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-04-07 22:31:07 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-04-07 22:31:07 +0300
commit3ded903d7b0c477d63916ed6f0258392e4cb001a (patch)
tree334cdd8010cb5e1fae56105e938fca702d90479b /db
parent5d4449151fb576dc927ff1d0ff343fca4645159b (diff)
parent682748e8abbc05d3059c2f945cda9d18081947f5 (diff)
Merge branch 'dosuken123/gitlab-ce-2989-run-cicd-pipelines-on-a-schedule-idea1-basic-backend-implementation-with-quick-ui' into 'master'
Add "engineering" UI for Pipeline Schedule See merge request !10533
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb9
-rw-r--r--db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb9
-rw-r--r--db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb18
-rw-r--r--db/schema.rb5
4 files changed, 40 insertions, 1 deletions
diff --git a/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb b/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb
new file mode 100644
index 00000000000..523a306f127
--- /dev/null
+++ b/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb
@@ -0,0 +1,9 @@
+class AddRefToCiTriggerSchedule < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :ci_trigger_schedules, :ref, :string
+ end
+end
diff --git a/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb b/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb
new file mode 100644
index 00000000000..36892118ac0
--- /dev/null
+++ b/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb
@@ -0,0 +1,9 @@
+class AddActiveToCiTriggerSchedule < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :ci_trigger_schedules, :active, :boolean
+ end
+end
diff --git a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb
new file mode 100644
index 00000000000..626c2a67fdc
--- /dev/null
+++ b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb
@@ -0,0 +1,18 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddIndexToNextRunAtAndActive < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :ci_trigger_schedules, [:active, :next_run_at]
+ end
+
+ def down
+ remove_concurrent_index :ci_trigger_schedules, [:active, :next_run_at]
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 201563cbf31..5660c58dc5f 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170406115029) do
+ActiveRecord::Schema.define(version: 20170407140450) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -311,8 +311,11 @@ ActiveRecord::Schema.define(version: 20170406115029) do
t.string "cron"
t.string "cron_timezone"
t.datetime "next_run_at"
+ t.string "ref"
+ t.boolean "active"
end
+ add_index "ci_trigger_schedules", ["active", "next_run_at"], name: "index_ci_trigger_schedules_on_active_and_next_run_at", using: :btree
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