diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /db/migrate/20201228110136_create_iterations_cadence.rb | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) | |
download | gitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'db/migrate/20201228110136_create_iterations_cadence.rb')
-rw-r--r-- | db/migrate/20201228110136_create_iterations_cadence.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/db/migrate/20201228110136_create_iterations_cadence.rb b/db/migrate/20201228110136_create_iterations_cadence.rb new file mode 100644 index 00000000000..95601ab4b29 --- /dev/null +++ b/db/migrate/20201228110136_create_iterations_cadence.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class CreateIterationsCadence < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + create_table_with_constraints :iterations_cadences do |t| + t.references :group, null: false, foreign_key: { to_table: :namespaces, on_delete: :cascade } + t.timestamps_with_timezone null: false + t.date :start_date, null: false + t.date :last_run_date + t.integer :duration_in_weeks + t.integer :iterations_in_advance + t.boolean :active, default: true, null: false + t.boolean :automatic, default: true, null: false + t.text :title, null: false + + t.text_limit :title, 255 + end + end + + def down + drop_table :iterations_cadences if table_exists?(:iterations_cadences) + end +end |