summaryrefslogtreecommitdiff
path: root/db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb')
-rw-r--r--db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb b/db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb
new file mode 100644
index 00000000000..187ab0aa20b
--- /dev/null
+++ b/db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class ChangeVerificationChecksumFieldTypeInPackageFile < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def up
+ # The use of this column is behind a feature flag that never got enabled,
+ # so it's safe to remove it in a normal migration
+ remove_column :packages_package_files, :verification_checksum, :string # rubocop:disable Migration/RemoveColumn
+ add_column :packages_package_files, :verification_checksum, :binary
+ end
+
+ def down
+ remove_column :packages_package_files, :verification_checksum, :binary
+ add_column :packages_package_files, :verification_checksum, :string
+ end
+end