2af8e74079
- 4 tables Docker (settings/compose_roots/compose_stacks/stack_services)
+ migration 0004 (timestamps journal monotones)
- templates docker/scan-compose + inspect-compose ; renderTemplate bascule
sur délimiteurs <% %> pour les templates docker/ afin de préserver les
Go-templates {{.ID}} intacts
- dockerScan: parseDockerScan (TDD) + scanDockerStacks (persiste stacks
candidats, complète la détection par labels)
- action docker_scan branchée dans execute (route dédiée, archivage report/log)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
54 lines
1.7 KiB
SQL
54 lines
1.7 KiB
SQL
CREATE TABLE `docker_compose_roots` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`machine_id` text NOT NULL,
|
|
`path` text NOT NULL,
|
|
`enabled` integer DEFAULT 1 NOT NULL,
|
|
`scan_depth` integer,
|
|
`created_at` text NOT NULL,
|
|
`updated_at` text NOT NULL,
|
|
FOREIGN KEY (`machine_id`) REFERENCES `machines`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `docker_compose_stacks` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`machine_id` text NOT NULL,
|
|
`name` text NOT NULL,
|
|
`working_dir` text NOT NULL,
|
|
`compose_files_json` text NOT NULL,
|
|
`project_name` text,
|
|
`env_file` text,
|
|
`status` text NOT NULL,
|
|
`detected_by` text,
|
|
`last_scan_at` text,
|
|
`last_update_at` text,
|
|
`created_at` text NOT NULL,
|
|
`updated_at` text NOT NULL,
|
|
FOREIGN KEY (`machine_id`) REFERENCES `machines`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `docker_settings` (
|
|
`machine_id` text PRIMARY KEY NOT NULL,
|
|
`enabled` integer DEFAULT 0 NOT NULL,
|
|
`scan_depth` integer DEFAULT 4 NOT NULL,
|
|
`prune_mode` text DEFAULT 'safe' NOT NULL,
|
|
`last_scan_at` text,
|
|
`last_pull_check_at` text,
|
|
`updated_at` text NOT NULL,
|
|
FOREIGN KEY (`machine_id`) REFERENCES `machines`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `docker_stack_services` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`stack_id` text NOT NULL,
|
|
`service_name` text NOT NULL,
|
|
`image_ref` text,
|
|
`current_image_id` text,
|
|
`current_digest` text,
|
|
`candidate_image_id` text,
|
|
`candidate_digest` text,
|
|
`version_label` text,
|
|
`status` text,
|
|
`updated_at` text NOT NULL,
|
|
FOREIGN KEY (`stack_id`) REFERENCES `docker_compose_stacks`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|