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
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200721052853_create_dast_scanner_profile.rb')
-rw-r--r--db/migrate/20200721052853_create_dast_scanner_profile.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/db/migrate/20200721052853_create_dast_scanner_profile.rb b/db/migrate/20200721052853_create_dast_scanner_profile.rb
new file mode 100644
index 00000000000..0dc0012d837
--- /dev/null
+++ b/db/migrate/20200721052853_create_dast_scanner_profile.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+class CreateDastScannerProfile < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ unless table_exists?(:dast_scanner_profiles)
+ with_lock_retries do
+ create_table :dast_scanner_profiles do |t|
+ t.timestamps_with_timezone null: false
+ t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade }, type: :integer
+ t.integer :spider_timeout, limit: 2
+ t.integer :target_timeout, limit: 2
+ t.text :name, null: false
+ t.index [:project_id, :name], unique: true
+ end
+ end
+ end
+
+ add_text_limit(:dast_scanner_profiles, :name, 255)
+ end
+
+ def down
+ with_lock_retries do
+ drop_table :dast_scanner_profiles
+ end
+ end
+end