diff options
Diffstat (limited to 'db/migrate/20210412111213_create_security_orchestration_policy_rule_schedule.rb')
-rw-r--r-- | db/migrate/20210412111213_create_security_orchestration_policy_rule_schedule.rb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/db/migrate/20210412111213_create_security_orchestration_policy_rule_schedule.rb b/db/migrate/20210412111213_create_security_orchestration_policy_rule_schedule.rb deleted file mode 100644 index 365fa36f11b..00000000000 --- a/db/migrate/20210412111213_create_security_orchestration_policy_rule_schedule.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class CreateSecurityOrchestrationPolicyRuleSchedule < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_PREFIX = 'index_sop_schedules_' - - disable_ddl_transaction! - - def up - table_comment = { owner: 'group::container security', description: 'Schedules used to store relationship between project and security policy repository' } - - create_table_with_constraints :security_orchestration_policy_rule_schedules, comment: Gitlab::Json.dump(table_comment) do |t| - t.timestamps_with_timezone - t.datetime_with_timezone :next_run_at, null: true - - t.references :security_orchestration_policy_configuration, null: false, foreign_key: { to_table: :security_orchestration_policy_configurations, on_delete: :cascade }, index: { name: INDEX_PREFIX + 'on_sop_configuration_id' } - t.references :user, null: false, foreign_key: { on_delete: :cascade }, index: { name: INDEX_PREFIX + 'on_user_id' } - - t.integer :policy_index, null: false - t.text :cron, null: false - - t.text_limit :cron, 255 - end - end - - def down - with_lock_retries do - drop_table :security_orchestration_policy_rule_schedules - end - end -end |