forked from 3wordchant/capsul-flask
first crack at adding ssh host key display to the capsul detail page
This commit is contained in:
7
capsulflask/schema_migrations/12_down_ssh_host_keys.sql
Normal file
7
capsulflask/schema_migrations/12_down_ssh_host_keys.sql
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
DROP TABLE vm_ssh_host_key;
|
||||
|
||||
ALTER TABLE vm_ssh_authorized_key RENAME TO vm_ssh_public_key;
|
||||
|
||||
UPDATE schemaversion SET version = 11;
|
14
capsulflask/schema_migrations/12_up_ssh_host_keys.sql
Normal file
14
capsulflask/schema_migrations/12_up_ssh_host_keys.sql
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
CREATE TABLE vm_ssh_host_key (
|
||||
email TEXT NOT NULL,
|
||||
vm_id TEXT NOT NULL,
|
||||
key_type TEXT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
sha256 TEXT NOT NULL,
|
||||
FOREIGN KEY (email, vm_id) REFERENCES vms(email, id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (email, vm_id, key_type)
|
||||
);
|
||||
|
||||
ALTER TABLE vm_ssh_public_key RENAME TO vm_ssh_authorized_key;
|
||||
|
||||
UPDATE schemaversion SET version = 12;
|
Reference in New Issue
Block a user