mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-05 06:12:09 +08:00
Each project can register multiple named sets of public keys. For example, a project might want one set of public keys for VMs for system A, and another set of public keys for VMs for system B. When creating a VM, they would pick the appropriate key set (or use a custom key per VM as they did before).
14 lines
419 B
Ruby
14 lines
419 B
Ruby
# frozen_string_literal: true
|
|
|
|
Sequel.migration do
|
|
change do
|
|
create_table(:ssh_public_key) do
|
|
# UBID.to_base32_n("sk") => 819
|
|
column :id, :uuid, primary_key: true, default: Sequel.lit("gen_random_ubid_uuid(819)")
|
|
foreign_key :project_id, :project, type: :uuid, null: false
|
|
String :name, null: false
|
|
String :public_key, null: false
|
|
unique [:project_id, :name]
|
|
end
|
|
end
|
|
end
|