don't check for run sql migration name in server mode (fix #778) (#780)

This commit is contained in:
Aravind Shankar 2018-10-16 17:18:42 +05:30 committed by Shahidh K Muhammed
parent 45691e3509
commit bdcb282c32
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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';
}