We typically add a created_at column to our resources, but it looks like we missed doing so for installations and load balancers initially. I’ll populate the created_at column for installations using the GitHub API. For load balancers, I may populate the column based on the timestamps of associated resources.
14 lines
350 B
Ruby
14 lines
350 B
Ruby
# frozen_string_literal: true
|
|
|
|
Sequel.migration do
|
|
change do
|
|
alter_table(:github_installation) do
|
|
add_column :created_at, :timestamptz, null: false, default: Sequel::CURRENT_TIMESTAMP
|
|
end
|
|
|
|
alter_table(:load_balancer) do
|
|
add_column :created_at, :timestamptz, null: false, default: Sequel::CURRENT_TIMESTAMP
|
|
end
|
|
end
|
|
end
|