|
@@ -47,6 +47,9 @@ const MigrationsApp: React.FC = () => {
|
|
|
|
|
|
|
|
const response = await axios.get('/api/migrations');
|
|
const response = await axios.get('/api/migrations');
|
|
|
setMigrationResult(response.data);
|
|
setMigrationResult(response.data);
|
|
|
|
|
+ if (response.data.success) {
|
|
|
|
|
+ queryClient.invalidateQueries({ queryKey: ['migrations-history'] });
|
|
|
|
|
+ }
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
|
setMigrationResult({
|
|
setMigrationResult({
|
|
|
success: false,
|
|
success: false,
|
|
@@ -65,6 +68,9 @@ const MigrationsApp: React.FC = () => {
|
|
|
|
|
|
|
|
const response = await axios.get(`/api/migrations/rollback?all=${all}`);
|
|
const response = await axios.get(`/api/migrations/rollback?all=${all}`);
|
|
|
setMigrationResult(response.data);
|
|
setMigrationResult(response.data);
|
|
|
|
|
+ if (response.data.success) {
|
|
|
|
|
+ queryClient.invalidateQueries({ queryKey: ['migrations-history'] });
|
|
|
|
|
+ }
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
|
setMigrationResult({
|
|
setMigrationResult({
|
|
|
success: false,
|
|
success: false,
|