create table in multi-schema

This commit is contained in:
Jan Prochazka
2024-09-19 09:24:08 +02:00
parent 55db98fe1b
commit 5f23b29c4e
7 changed files with 44 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
import _ from 'lodash';
import openNewTab from '../utility/openNewTab';
import { findEngineDriver, getConnectionLabel } from 'dbgate-tools';
import { getExtensions } from '../stores';
import { getAppliedCurrentSchema, getExtensions } from '../stores';
export default function newTable(connection, database) {
const tooltip = `${getConnectionLabel(connection)}\n${database}`;
@@ -21,7 +21,7 @@ export default function newTable(connection, database) {
editor: {
current: {
pureName: 'new_table',
schemaName: driver?.dialect?.defaultSchemaName,
schemaName: getAppliedCurrentSchema() ?? driver?.dialect?.defaultSchemaName,
columns: [
{
columnName: 'id',