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')
-rw-r--r--db/migrate/20240119110912_timestamp_for_sbom_source_packages.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20240119110912_timestamp_for_sbom_source_packages.rb b/db/migrate/20240119110912_timestamp_for_sbom_source_packages.rb
new file mode 100644
index 00000000000..101209c33a7
--- /dev/null
+++ b/db/migrate/20240119110912_timestamp_for_sbom_source_packages.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class TimestampForSbomSourcePackages < Gitlab::Database::Migration[2.2]
+ milestone '16.9'
+
+ def up
+ add_timestamps_with_timezone(:sbom_source_packages, null: false, default: -> { 'NOW()' })
+ end
+
+ def down
+ remove_timestamps(:sbom_source_packages)
+ end
+end