Browse Source

fix: update bt, hm and mm column names

- BT - `TableRead` => `Table`
- HM - `TableList` => `Table List`
- MM - `TableMMList` => `Table List`

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2482/head
Pranav C 2 years ago
parent
commit
2f5f1ef872
  1. 2
      packages/nocodb/src/lib/meta/api/columnApis.ts
  2. 2
      packages/nocodb/src/lib/meta/api/metaDiffApis.ts
  3. 2
      packages/nocodb/src/lib/meta/api/projectApis.ts
  4. 2
      scripts/cypress/integration/common/4e_form_view_share.js
  5. 2
      scripts/cypress/integration/common/5a_user_role.js

2
packages/nocodb/src/lib/meta/api/columnApis.ts

@ -57,7 +57,7 @@ async function createHmAndBtColumn(
{ {
const title = getUniqueColumnAliasName( const title = getUniqueColumnAliasName(
await child.getColumns(), await child.getColumns(),
type === 'bt' ? alias : `${parent.title}Read` type === 'bt' ? alias : `${parent.title}`
); );
await Column.insert<LinkToAnotherRecordColumn>({ await Column.insert<LinkToAnotherRecordColumn>({
title, title,

2
packages/nocodb/src/lib/meta/api/metaDiffApis.ts

@ -671,7 +671,7 @@ export async function metaDiffSync(req, res) {
if (change.relationType === RelationTypes.BELONGS_TO) { if (change.relationType === RelationTypes.BELONGS_TO) {
const title = getUniqueColumnAliasName( const title = getUniqueColumnAliasName(
childModel.columns, childModel.columns,
`${parentModel.title || parentModel.table_name}Read` `${parentModel.title || parentModel.table_name}`
); );
await Column.insert<LinkToAnotherRecordColumn>({ await Column.insert<LinkToAnotherRecordColumn>({
uidt: UITypes.LinkToAnotherRecord, uidt: UITypes.LinkToAnotherRecord,

2
packages/nocodb/src/lib/meta/api/projectApis.ts

@ -230,7 +230,7 @@ async function populateMeta(base: Base, project: Project): Promise<any> {
uidt: UITypes.LinkToAnotherRecord, uidt: UITypes.LinkToAnotherRecord,
type: 'bt', type: 'bt',
bt, bt,
title: `${bt.rtitle}Read` title: `${bt.rtitle}`
}; };
}) })
]; ];

2
scripts/cypress/integration/common/4e_form_view_share.js

@ -131,7 +131,7 @@ export const genTest = (apiType, dbType) => {
// all fields, barring removed field should exist // all fields, barring removed field should exist
cy.get('[title="City"]').should("exist"); cy.get('[title="City"]').should("exist");
cy.get('[title="LastUpdate"]').should("exist"); cy.get('[title="LastUpdate"]').should("exist");
cy.get('[title="CountryRead"]').should("exist"); cy.get('[title="Country"]').should("exist");
cy.get('[title="AddressList"]').should("not.exist"); cy.get('[title="AddressList"]').should("not.exist");
// order of LastUpdate & City field is retained // order of LastUpdate & City field is retained

2
scripts/cypress/integration/common/5a_user_role.js

@ -209,7 +209,7 @@ export const genTest = (apiType, dbType) => {
const verifyCsv = (retrievedRecords) => { const verifyCsv = (retrievedRecords) => {
// expected output, statically configured // expected output, statically configured
let storedRecords = [ let storedRecords = [
`City,AddressList,CountryRead`, `City,AddressList,Country`,
`A Corua (La Corua),939 Probolinggo Loop,Spain`, `A Corua (La Corua),939 Probolinggo Loop,Spain`,
`Abha,733 Mandaluyong Place,Saudi Arabia`, `Abha,733 Mandaluyong Place,Saudi Arabia`,
`Abu Dhabi,535 Ahmadnagar Manor,United Arab Emirates`, `Abu Dhabi,535 Ahmadnagar Manor,United Arab Emirates`,

Loading…
Cancel
Save