mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
This commit is contained in:
parent
f86fcde723
commit
35230cb091
@ -128,9 +128,14 @@ const executeSQL = (isMigration, migrationName) => (dispatch, getState) => {
|
||||
}
|
||||
response.json().then(
|
||||
errorMsg => {
|
||||
const title = 'SQL Execution Failed';
|
||||
dispatch({ type: UPDATE_MIGRATION_STATUS_ERROR, data: errorMsg });
|
||||
dispatch({ type: REQUEST_ERROR, data: errorMsg });
|
||||
dispatch(handleMigrationErrors('SQL Execution Failed', errorMsg));
|
||||
if (isMigration) {
|
||||
dispatch(handleMigrationErrors(title, errorMsg));
|
||||
} else {
|
||||
dispatch(showErrorNotification(title, errorMsg.code, errorMsg));
|
||||
}
|
||||
},
|
||||
() => {
|
||||
dispatch(
|
||||
|
@ -80,7 +80,7 @@ const RawSQL = ({
|
||||
const isMigration = checkboxElem ? checkboxElem.checked : false;
|
||||
const textboxElem = document.getElementById('migration-name');
|
||||
let migrationName = textboxElem ? textboxElem.value : '';
|
||||
if (migrationName.length === 0) {
|
||||
if (isMigration && migrationName.length === 0) {
|
||||
migrationName = 'run_sql_migration';
|
||||
}
|
||||
if (!isMigration && globals.consoleMode === 'cli') {
|
||||
|
Loading…
Reference in New Issue
Block a user