Files
ubicloud/migrate/20240122_pg_resource_fw_rules.rb
Furkan Sahin a67ec01906 Add PostgresResourceFirewallRule model
This commit adds a new table named pg_resource_firewall_rule. This way,
we will be able to manage a pg resource' firewall rules in its own
table. This is mainly required for;
1. Properly visualizing the pg resource firewall rules in the UI in the
next PR.
2. Having a single place that will be used by multiple VMs under the
same postgres resource (e.g. pg HA).
2024-02-01 11:30:43 +01:00

13 lines
351 B
Ruby

# frozen_string_literal: true
Sequel.migration do
change do
create_table(:postgres_firewall_rule) do
column :id, :uuid, primary_key: true, null: false
column :cidr, :cidr, null: false
foreign_key :postgres_resource_id, :postgres_resource, null: false, type: :uuid
unique [:postgres_resource_id, :cidr]
end
end
end