mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-04 05:42:15 +08:00
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.
13 lines
350 B
Ruby
13 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
|