Add timestamp for sbom_source_packages
What does this MR do and why?
Add timestamps for the sbom_source_packages
table. We need them to be able to ingest data.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Migration
up
rails db:migrate
main: == [advisory_lock_connection] object_id: 183460, pg_backend_pid: 76082
main: == 20240119110912 TimestampForSbomSourcePackages: migrating ===================
main: -- add_column(:sbom_source_packages, :created_at, :datetime_with_timezone, {:default=>#<Proc:0x000000016f4d5560 /Users/tetianachupryna/Documents/gitlab-development-kit/gitlab/db/migrate/20240119110912_timestamp_for_sbom_source_packages.rb:7 (lambda)>, :null=>false})
main: -> 0.0020s
main: -- add_column(:sbom_source_packages, :updated_at, :datetime_with_timezone, {:default=>#<Proc:0x000000016f4d5560 /Users/tetianachupryna/Documents/gitlab-development-kit/gitlab/db/migrate/20240119110912_timestamp_for_sbom_source_packages.rb:7 (lambda)>, :null=>false})
main: -> 0.0004s
main: == 20240119110912 TimestampForSbomSourcePackages: migrated (0.0064s) ==========
main: == [advisory_lock_connection] object_id: 183460, pg_backend_pid: 76082
ci: == [advisory_lock_connection] object_id: 183720, pg_backend_pid: 76084
ci: == 20240119110912 TimestampForSbomSourcePackages: migrating ===================
ci: -- add_column(:sbom_source_packages, :created_at, :datetime_with_timezone, {:default=>#<Proc:0x0000000172f9f0b0 /Users/tetianachupryna/Documents/gitlab-development-kit/gitlab/db/migrate/20240119110912_timestamp_for_sbom_source_packages.rb:7 (lambda)>, :null=>false})
ci: -> 0.0009s
ci: -- add_column(:sbom_source_packages, :updated_at, :datetime_with_timezone, {:default=>#<Proc:0x0000000172f9f0b0 /Users/tetianachupryna/Documents/gitlab-development-kit/gitlab/db/migrate/20240119110912_timestamp_for_sbom_source_packages.rb:7 (lambda)>, :null=>false})
ci: -> 0.0003s
ci: == 20240119110912 TimestampForSbomSourcePackages: migrated (0.0101s) ==========
ci: == [advisory_lock_connection] object_id: 183720, pg_backend_pid: 76084
down
rails db:rollback:main
main: == [advisory_lock_connection] object_id: 183020, pg_backend_pid: 76822
main: == 20240119110912 TimestampForSbomSourcePackages: reverting ===================
main: -- remove_column(:sbom_source_packages, :created_at)
main: -> 0.0013s
main: -- remove_column(:sbom_source_packages, :updated_at)
main: -> 0.0003s
main: == 20240119110912 TimestampForSbomSourcePackages: reverted (0.0055s) ==========
main: == [advisory_lock_connection] object_id: 183020, pg_backend_pid: 76822
Related to #427095 (closed)
Edited by Tetiana Chupryna