console: export metadata before tracking new table (fix #6805) (fix #7221) (fix #7233)

GITHUB_PR_NUMBER: 7330
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7330

https://github.com/hasura/graphql-engine-mono/pull/1970

Co-authored-by: Kenneth J. Miller <6822406+KloudJack@users.noreply.github.com>
GitOrigin-RevId: 9532f7b596801ebcdd15bd40a9b3ace0b9b88326
This commit is contained in:
hasura-bot 2021-08-06 14:38:27 +05:30
parent 0341037aeb
commit e78bc4b0ed
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,7 @@
- server: fix inherited roles bug where mutations were not accessible when inherited roles was enabled
- server: reintroduce the unique name constraint in allowed lists
- server: subscriptions now validate that all session variables are properly set (#7111)
- console: fix metadata out-of-date errors when creating tables with certain configurations (fix #6805) (fix #7233)
- cli-migrations-v2: fix database url showing up in metadata (#7319)
## v2.0.4

View File

@ -13,6 +13,7 @@ import {
escapeTableName,
} from '../../../../dataSources/common';
import { getRunSqlQuery } from '../../../Common/utils/v1QueryUtils';
import { exportMetadata } from '../../../../metadata/actions';
import {
getTrackTableQuery,
getUntrackTableQuery,
@ -267,7 +268,9 @@ const createTableSql = () => {
const errorMsg = 'Create table failed';
const customOnSuccess = () => {
dispatch(exportMetadata()).then(() => {
dispatch(trackTable({ schema: currentSchema, name: tableName }));
});
};
const customOnError = err => {
dispatch({ type: REQUEST_ERROR, data: errorMsg });