mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
* fix(host-metrics): exclude image and firmware filesystems * fix(ci): build plugin SDK before dependent checks * fix(mysql): keep plugin settings scope indexes within limits * test(mysql): refresh reviewed plugin upgrade SQL
16 lines
805 B
SQL
16 lines
805 B
SQL
CREATE TABLE `plugin_settings` (
|
|
`id` int AUTO_INCREMENT NOT NULL,
|
|
`plugin_id` varchar(255) NOT NULL,
|
|
`scope` enum('admin','user','host','secret') NOT NULL,
|
|
`scope_id` varchar(255),
|
|
`key` varchar(255) NOT NULL,
|
|
`value` text,
|
|
`encrypted` boolean NOT NULL DEFAULT false,
|
|
`updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
|
CONSTRAINT `plugin_settings_id` PRIMARY KEY(`id`),
|
|
CONSTRAINT `idx_plugin_settings_scope_key` UNIQUE(`plugin_id`,`scope`,`scope_id`,`key`)
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE `plugin_settings` ADD CONSTRAINT `plugin_settings_plugin_id_plugins_id_fk` FOREIGN KEY (`plugin_id`) REFERENCES `plugins`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
CREATE INDEX `idx_plugin_settings_plugin_scope` ON `plugin_settings` (`plugin_id`,`scope`);
|