Browse Source

Merge pull request #4450 from nocodb/fix/table-rename-inflection

Fix: Table rename - use user inputed value as alias
pull/4455/head
Raju Udava 2 years ago committed by GitHub
parent
commit
d8009a8d65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      packages/nc-gui/components/dlg/TableRename.vue
  2. 8
      packages/nc-gui/pages/index/index/create-external.vue
  3. 1
      packages/nocodb-sdk/src/lib/Api.ts
  4. 3
      scripts/sdk/swagger.json

1
packages/nc-gui/components/dlg/TableRename.vue

@ -119,6 +119,7 @@ const renameTable = async () => {
await $api.dbTable.update(tableMeta.id as string, { await $api.dbTable.update(tableMeta.id as string, {
project_id: tableMeta.project_id, project_id: tableMeta.project_id,
table_name: formState.title, table_name: formState.title,
title: formState.title,
}) })
dialogShow.value = false dialogShow.value = false

8
packages/nc-gui/pages/index/index/create-external.vue

@ -46,8 +46,8 @@ let formState = $ref<ProjectCreateForm>({
title: '', title: '',
dataSource: { ...getDefaultConnectionConfig(ClientType.MYSQL) }, dataSource: { ...getDefaultConnectionConfig(ClientType.MYSQL) },
inflection: { inflection: {
inflectionColumn: 'camelize', inflectionColumn: 'none',
inflectionTable: 'camelize', inflectionTable: 'none',
}, },
sslUse: SSLUsage.No, sslUse: SSLUsage.No,
extraParameters: [], extraParameters: [],
@ -57,8 +57,8 @@ const customFormState = ref<ProjectCreateForm>({
title: '', title: '',
dataSource: { ...getDefaultConnectionConfig(ClientType.MYSQL) }, dataSource: { ...getDefaultConnectionConfig(ClientType.MYSQL) },
inflection: { inflection: {
inflectionColumn: 'camelize', inflectionColumn: 'none',
inflectionTable: 'camelize', inflectionTable: 'none',
}, },
sslUse: SSLUsage.No, sslUse: SSLUsage.No,
extraParameters: [], extraParameters: [],

1
packages/nocodb-sdk/src/lib/Api.ts

@ -1950,6 +1950,7 @@ export class Api<
tableId: string, tableId: string,
data: { data: {
table_name?: string; table_name?: string;
title?: string;
project_id?: string; project_id?: string;
}, },
params: RequestParams = {} params: RequestParams = {}

3
scripts/sdk/swagger.json

@ -1703,6 +1703,9 @@
"table_name": { "table_name": {
"type": "string" "type": "string"
}, },
"title": {
"type": "string"
},
"project_id": { "project_id": {
"type": "string" "type": "string"
} }

Loading…
Cancel
Save