feat: add Clone Database to Docker functionality
Clone any database to a local Docker PostgreSQL container with schema and/or data transfer via pg_dump. Supports three modes: schema only, full clone, and sample data. Includes container lifecycle management (start/stop/remove) in the Admin panel, progress tracking with collapsible process log, and automatic connection creation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -323,6 +323,52 @@ export interface ErdData {
|
||||
relationships: ErdRelationship[];
|
||||
}
|
||||
|
||||
// Docker
|
||||
export interface DockerStatus {
|
||||
installed: boolean;
|
||||
daemon_running: boolean;
|
||||
version: string | null;
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
export type CloneMode = "schema_only" | "full_clone" | "sample_data";
|
||||
|
||||
export interface CloneToDockerParams {
|
||||
source_connection_id: string;
|
||||
source_database: string;
|
||||
container_name: string;
|
||||
pg_version: string;
|
||||
host_port: number | null;
|
||||
clone_mode: CloneMode;
|
||||
sample_rows: number | null;
|
||||
postgres_password: string | null;
|
||||
}
|
||||
|
||||
export interface CloneProgress {
|
||||
clone_id: string;
|
||||
stage: string;
|
||||
percent: number;
|
||||
message: string;
|
||||
detail: string | null;
|
||||
}
|
||||
|
||||
export interface TuskContainer {
|
||||
container_id: string;
|
||||
name: string;
|
||||
status: string;
|
||||
host_port: number;
|
||||
pg_version: string;
|
||||
source_database: string | null;
|
||||
source_connection: string | null;
|
||||
created_at: string | null;
|
||||
}
|
||||
|
||||
export interface CloneResult {
|
||||
container: TuskContainer;
|
||||
connection_id: string;
|
||||
connection_url: string;
|
||||
}
|
||||
|
||||
export type TabType = "query" | "table" | "structure" | "roles" | "sessions" | "lookup" | "erd";
|
||||
|
||||
export interface Tab {
|
||||
|
||||
Reference in New Issue
Block a user