Files
ubicloud/migrate/20250114_project_id_columns_for_models.rb
Jeremy Evans e95a4b8e3f Add project_id to tables that should only be associated with a single project
Previously, the following tables could be associated to 0 or more
projects:

* api_key
* firewall
* load_balancer
* minio_cluster
* private_subnet
* vm

It only makes sense for these to be associated to a single project,
so this adds a project_id column to each.  This is the first step
of the conversion process, which will eventually see the access_tag
table only be used for a project <-> accounts join table.
2025-01-14 11:56:06 -08:00

13 lines
352 B
Ruby

# frozen_string_literal: true
Sequel.migration do
change do
add_column :api_key, :project_id, :uuid
add_column :firewall, :project_id, :uuid
add_column :load_balancer, :project_id, :uuid
add_column :minio_cluster, :project_id, :uuid
add_column :private_subnet, :project_id, :uuid
add_column :vm, :project_id, :uuid
end
end