mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
This commit is contained in:
parent
45691e3509
commit
bdcb282c32
@ -46,7 +46,7 @@ const executeSQL = (isMigration, migrationName) => (dispatch, getState) => {
|
||||
];
|
||||
// check if track view enabled
|
||||
if (getState().rawSQL.isTableTrackChecked) {
|
||||
const regExp = /create (view|table) ((\"?\w+\"?)\.(\"?\w+\"?)|(\w+))/i; // eslint-disable-line
|
||||
const regExp = /create (view|table) ((\"?\w+\"?)\.(\"?\w+\"?)|(\"?\w+\"?))/i; // eslint-disable-line
|
||||
const matches = sql.match(regExp);
|
||||
// If group 5 is undefined, use group 3 and 4 for schema and table respectively
|
||||
// If group 5 is present, use group 5 for table name using public schema.
|
||||
|
@ -96,7 +96,7 @@ const RawSQL = ({
|
||||
const checkboxElem = document.getElementById('migration-checkbox');
|
||||
const isMigration = checkboxElem ? checkboxElem.checked : false;
|
||||
const textboxElem = document.getElementById('migration-name');
|
||||
let migrationName = textboxElem.value;
|
||||
let migrationName = textboxElem ? textboxElem.value : '';
|
||||
if (migrationName.length === 0) {
|
||||
migrationName = 'run_sql_migration';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user