feat: implement database management service layer and frontend SQL import/export utility

This commit is contained in:
Ümit Tunç
2026-04-28 21:12:20 +03:00
parent 01ddb81aa9
commit ab5a12f8f2
6 changed files with 48 additions and 24 deletions
+3 -2
View File
@@ -39,10 +39,11 @@ export const SchemaService = {
bulkAction: (data: { tables: string[], action: string, database: string }) => api.post('/schema/bulk-action', data),
batchUpdate: (table: string, changes: any[]) => api.post(`/schema/${table}/batch-update`, { changes }),
executeQuery: (query: string) => api.post('/schema/execute', { query }),
exportDatabase: (database?: string, table?: string, filters?: any) => api.post('/schema/export', {
exportDatabase: (database?: string, table?: string, filters?: any, structureOnly: boolean = false) => api.post('/schema/export', {
database,
table,
filters: filters ? JSON.stringify(filters) : undefined
filters: filters ? JSON.stringify(filters) : undefined,
structureOnly
}, { responseType: 'blob' }),
importDatabase: (formData: FormData) => api.post('/schema/import', formData, {
headers: { 'Content-Type': 'multipart/form-data' }