twenty/packages/twenty-server
Weiko 2f223f3294
Fix 'name' column wrongly added in standard objects (#7428)
## Context
Name shouldn't be added to all tables, especially standard objects
because they already have their own labelIdentifierFieldMetadata
specified in the workspace-entity schema. This PR removes this column
from the "base" list of columns to add when creating a new object/table
and moves it to the object-metadata service that is, as of today, only
used for custom objects. Also had to modify the migration-runner to
handle column creation in a table creation migration (this was available
in the migration definition already but was not doing anything)

This also fixes an issue in standard objects that already have a "name"
field defined with a different field type, this is even more important
when the said field is a composite field. For example people already has
a FULL_NAME name field which clashes with the default TEXT name field
meaning it was only creating 1 field metadata for 'name' but 3 columns
were created: `name, nameFirstName, nameLastName`. This inconsistency
with metadata (which is our source of truth everywhere) brought some
issues (lately, converting back typeorm response to gql (including
composition) was broken).
2024-10-04 18:31:19 +02:00
..
@types feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
patches Improve demo seed (#7125) 2024-09-18 17:35:08 +02:00
scripts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
src Fix 'name' column wrongly added in standard objects (#7428) 2024-10-04 18:31:19 +02:00
test Handle migration of Phone field to Phones field (#7128) 2024-09-24 16:31:30 +02:00
.env.example fix(6423): add username and password for redis connection (#6745) 2024-09-04 16:56:37 +02:00
.env.test feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
.eslintrc.cjs feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
.gitignore feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
.prettierignore Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
.prettierrc Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
.swcrc feat: twenty orm for standard and custom objects (#6178) 2024-07-19 18:23:52 +02:00
jest-integration.config.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
jest.config.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
nest-cli.json 6653 serverless functions store and use environment variables in serverless function scripts (#7390) 2024-10-03 13:56:17 +02:00
package.json Tag main as 0.31 canary (#7332) 2024-09-30 11:42:06 +02:00
project.json feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
tsconfig.build.json chore: set up twenty-emails config so build isn't needed in development (#3619) 2024-01-29 06:17:12 -03:00
tsconfig.json feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
tsconfig.scripts.json feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00