mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23:25:24 +00:00
21 lines
689 B
SQL
21 lines
689 B
SQL
-- opkssh 0001: adopt_opkssh_tokens
|
|
-- Generated by termix-plugin migrations. Review before committing.
|
|
|
|
CREATE TABLE IF NOT EXISTS `opkssh_tokens` (
|
|
`id` int AUTO_INCREMENT PRIMARY KEY,
|
|
`user_id` varchar(255) NOT NULL,
|
|
`host_id` int NOT NULL,
|
|
`ssh_cert` text NOT NULL,
|
|
`private_key` text NOT NULL,
|
|
`email` text,
|
|
`sub` text,
|
|
`issuer` text,
|
|
`audience` text,
|
|
`created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
|
`expires_at` varchar(255) NOT NULL,
|
|
`last_used` text,
|
|
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
|
|
FOREIGN KEY (`host_id`) REFERENCES `ssh_data` (`id`) ON DELETE CASCADE
|
|
);
|
|
RENAME TABLE `opkssh_tokens` TO `p_opkssh_tokens`;
|