mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
feat(database): export with pg_dump and restore with pg_restore / psql (#3718)
PostgreSQL data sources, databases, schemas and tables get Import/Export > Export with 'pg_dump'... and Restore with 'pg_restore'/'psql'.... ide-db finds the installed client tools, turns the dialog's options into the command line, and runs it connected like the data source (SSH tunnel, SSL settings, read-only flag), with the password in PGPASSWORD and never in the arguments. Output streams to the UI; a RequestId cancels the run, which continues after the dialog closes and ends with a notification. The dialogs preselect the client matching the server's major version and warn when it does not fit; Restore reads the dump header to pick psql or pg_restore. Not offered in remote windows. Co-authored-by: EjaYF <9842286+EjaYF@users.noreply.github.com>
This commit is contained in:
co-authored by
EjaYF
parent
921378d531
commit
9bf1f320eb
@@ -1416,3 +1416,62 @@
|
||||
height: 5px;
|
||||
cursor: row-resize;
|
||||
}
|
||||
|
||||
/* Export with pg_dump / Restore with pg_restore or psql. */
|
||||
.dumpChecks {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: var(--space-1-5) var(--space-4);
|
||||
}
|
||||
.dumpPreview {
|
||||
grid-column: 1 / -1;
|
||||
max-height: 96px;
|
||||
overflow: auto;
|
||||
padding: 6px 8px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-control);
|
||||
background: var(--bg-editor);
|
||||
font-family: var(--openidea-editor-font, var(--font-mono));
|
||||
font-size: var(--fs-code);
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.dumpRun {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
padding: 14px;
|
||||
}
|
||||
.dumpLog {
|
||||
height: 320px;
|
||||
overflow: auto;
|
||||
padding: 6px 8px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-control);
|
||||
background: var(--bg-editor);
|
||||
font-family: var(--openidea-editor-font, var(--font-mono));
|
||||
font-size: var(--fs-code);
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.dumpPath {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.dumpStatus {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-0-5);
|
||||
min-width: 0;
|
||||
}
|
||||
.dumpRoute {
|
||||
color: var(--fg-muted);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.dumpError {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user