mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
14 lines
561 B
SQL
14 lines
561 B
SQL
-- ssh-terminal 0001: adopt_command_history
|
|
-- Generated by termix-plugin migrations. Review before committing.
|
|
|
|
CREATE TABLE IF NOT EXISTS `command_history` (
|
|
`id` int AUTO_INCREMENT PRIMARY KEY,
|
|
`user_id` varchar(255) NOT NULL,
|
|
`host_id` int NOT NULL,
|
|
`command` text NOT NULL,
|
|
`executed_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
|
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
|
|
FOREIGN KEY (`host_id`) REFERENCES `ssh_data` (`id`) ON DELETE CASCADE
|
|
);
|
|
RENAME TABLE `command_history` TO `p_ssh_terminal_command_history`;
|