summaryrefslogtreecommitdiff
path: root/db/migrate/20220110170953_create_ci_secure_files.rb
blob: 1498a2d0212daf81e9f8615054f047038fd30467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class CreateCiSecureFiles < Gitlab::Database::Migration[1.0]
  def up
    create_table :ci_secure_files do |t|
      t.bigint :project_id, index: true, null: false
      t.timestamps_with_timezone null: false
      t.integer :file_store, limit: 2, null: false, default: 1
      t.integer :permissions, null: false, default: 0, limit: 2
      t.text :name, null: false, limit: 255
      t.text :file, null: false, limit: 255
      t.binary :checksum, null: false
    end
  end

  def down
    drop_table :ci_secure_files, if_exists: true
  end
end