Commit Graph

301 Commits

Author SHA1 Message Date
Jérémy M
e026b2b6e9
feat: expose foreign key (#2505)
* fix: typo

* feat: expose foreign key

* fix: foreign key exposition

* fix: be able to filter by foreign key

* feat: add `isSystem` on field metadata

* feat: update all seeds

* fix: seed issues

* fix: sync metadata generated files

* fix: squash metadata migrations

* Fix conflicts

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-11-16 12:30:40 +01:00
brendanlaschke
e5caa7a5df
Eslint prevent duplicate import (#2516)
- eslint: prevent duplicate import
2023-11-16 12:26:43 +01:00
Weiko
ebd1ef5223
Add basic fields metadata (#2523)
* Add basic fields metadata

* add fieldmetadata dependency

* re-arrange modules

* fix

* fix seed

* set default fields nullable

* set default fields nullable

* fix tenantMigration order

* fix tenantMigration order
2023-11-15 19:21:51 +01:00
Lucas Bordeau
82142ab70e
Added working peopleV2 table (#2527) 2023-11-15 19:17:20 +01:00
Jérémy M
c02717c1e3
fix: schema builder use same type definitions storage across tenant (#2525) 2023-11-15 17:23:30 +01:00
bosiraphael
1fc3124d1e
Update favorites query and state to work with new backend (#2520)
* wip

* wip

* adding favorite works in the database

* favorites are showing in the left drawer

* update favoorite NavItem link

* wip

* adding favorite works

* everything seems to work

* fix delete bug

* fix update favorite position

* update Favorite type

* Fix

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-11-15 16:17:50 +01:00
Charles Bochet
6129444c5c
[WIP] Whole FE migrated (#2517)
* Wip

* WIP

* Removed concole log

* Add relations to workspace init (#2511)

* Add relations to workspace init

* remove logs

* update prefill

* add missing isSystem

* comment relation fields

* Migrate v2 core models to graphql schema (#2509)

* migrate v2 core models to graphql schema

* Migrate to new workspace member schema

* Continue work

* migrated-main

* Finished accountOwner nested field integration on companies

* Introduce bug

* Fix

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Weiko <corentin@twenty.com>
2023-11-15 15:46:06 +01:00
gitstart-twenty
1f49ed2acf
chore(server): convert User model to TypeORM entity (#2499)
* chore: convert basic RefreshToken model to TypeORM entity

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix import

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
2023-11-14 17:15:31 +01:00
Charles Bochet
01ccc13e36
Seed workspace member in workspace schema (#2504)
* Seed workspace member in workspace schema

* Fix
2023-11-14 15:48:03 +01:00
Weiko
7c229217be
Hide System Objects (#2488)
* Hide System Objects

* add filter isSystem: false in FIND_MANY_METADATA_OBJECTS

* add filter isSystem: false in FIND_MANY_METADATA_OBJECTS

* update generated gql

* add filter to useFindManyObjectMetadataItems

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-11-14 15:27:24 +01:00
gitstart-twenty
a69711429b
chore(backend): convert basic RefreshToken model to TypeORM entity (#2401)
* chore: convert basic RefreshToken model to TypeORM entity

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix import

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
2023-11-14 13:09:04 +01:00
Charles Bochet
6eb4e00ce1
Migrate WorkspaceMemberSetting into WorkspaceMember (#2501) 2023-11-14 12:34:48 +01:00
Jérémy M
65af954671
fix: relations issues (#2497)
* fix: relations issues

one-to-one relation not working
alias should not be used on the foreignKey side

* fix: naming
2023-11-14 12:07:17 +01:00
Charles Bochet
5566e6fba8
Complete all standard object migration to the new workspace schema (#2492)
* Complete all standard object migration to the new workspace schema

* Fixes
2023-11-14 10:24:36 +01:00
Weiko
3de2fc72dc
Create Relation with Fields from both sides (#2480)
* Create relation with fields from both sides

* update metadata codegen schema
2023-11-13 17:22:15 +01:00
Charles Bochet
05dbde79cf
Add standard company table migrations (#2484) 2023-11-13 17:18:37 +01:00
Weiko
f8a887e33e
Add is system flag to object metadata (#2481)
* Add isSystem flag to objectMetadata

* squash migrations and add dataSource->objects FK

* fix missing datasource enum type
2023-11-13 17:09:26 +01:00
Charles Bochet
9a109758c8
Migrate standard objects (#2439)
* Migrate standard objects

* Add migrations

* fix relation

* fix: register RelationMetadataType enum

* fix: correctly fix null relation

---------

Co-authored-by: corentin <corentin@twenty.com>
Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2023-11-13 16:08:27 +01:00
Charles Bochet
130a68dd26
Add relation metadata seed (#2431)
* Add relation metadata seed

* Fix

* Add filtering by relation id on server

* Fix
2023-11-10 23:53:07 +01:00
Weiko
032e516a46
fix one to many relation dynamic query (#2430) 2023-11-10 18:20:36 +01:00
Charles Bochet
54d7acd518
Split components into object-metadata and object-record (#2425)
* Split components into object-metadata and object-record

* Fix seed
2023-11-10 15:54:32 +01:00
Weiko
04c618284f
Convert metadata tables to camel_case (#2420)
* Convert metadata tables to camelcase

* refactor folder structure

* rename datasourcemetadata

* regenerate metadata schema

* rename dataSourceMetadata to dataSource
2023-11-10 15:33:25 +01:00
Charles Bochet
618513afcd
Rename fieldId and objectId into fieldMetadataId and objectMetadataId (#2421)
* Rename fieldId and objectId into fieldMetadataId and objectMetadataId

* Fix tests
2023-11-10 14:35:18 +01:00
Jérémy M
6a700ad1a5
feat: schema-builder and resolver-builder can handle relations (#2398)
* feat: wip add relation

* feat: add relation for custom and standards objects

* fix: use enum instead of magic string

* fix: remove dead code & fix tests

* fix: typo

* fix: BooleanFilter is missing

* fix: Malformed result error
2023-11-10 12:32:02 +01:00
Charles Bochet
7b9175a4a4
Revert "Convert metadata tables to camelCase" (#2419)
Revert "Convert metadata tables to camelCase (#2400)"

This reverts commit 1cf08c797f.
2023-11-10 11:48:44 +01:00
Weiko
1cf08c797f
Convert metadata tables to camelCase (#2400)
* Convert metadata tables to camelCase

* datasourcemetadataid to datasourceid

* refactor metadata folders

* fix command

* move commands out of metadata

* fix seed

* rename objectId and fieldId in objectMetadataId and fieldMetadataId in FE

* fix field-metadata

* Fix

* Fix

* remove logs

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-11-09 20:06:10 +01:00
Thaïs
0d4949484c
feat: add Money field type in settings (#2405)
Closes #2346
2023-11-09 17:13:34 +01:00
Weiko
0f7581acc3
Remove Tenant columns anonymisation (#2404)
* Remove Tenant columns anonymisation

* add tests

* use _ instead of custom_

* put _ on all custom fields
2023-11-09 12:19:33 +01:00
martmull
fe20be8487
0.2.0 cleaning script (#2403)
* Update cleaning script to run on old schema

* Add boundaries parameter

* Stop requesting data for each workspace/table

* Stop checking same as seed if not requested

* Minor update

* Minor update

* Minor update

* Minor update

* Minor update

* Simplify result

* Simplify result

* Simplify result

* Delete updates

* Fix issues

* Update logs

* Remove throw when schema does not exist

* Remove missing table in old schema

* Remove boundaries parameter

* Remove useless trycatch
2023-11-09 12:18:09 +01:00
gitstart-twenty
56dc87a60f
chore: create a new TypeORM config using @nestjs/typeorm for public schema (#2241)
* chore: create a new TypeORM config using @nestjs/typeorm for public schema

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Remove unnecessary changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor imports

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
2023-11-08 11:26:52 +01:00
Weiko
cafffd973f
Add Relation Metadata (#2388)
* Add Relation Metadata

* remove logs

* fix migrations

* add one-to-many relation inside entities

* fix relation

* use enum for tenant migration column action type
2023-11-08 09:39:44 +01:00
Charles Bochet
4ca4f17897 Fix boolean fieldtype case 2023-11-07 14:03:44 +01:00
martmull
0ae56b055c
Clean metadata and schema (#2382) 2023-11-07 12:33:54 +01:00
martmull
462c7ebdc1
0.2.0 cleaning script (#2379)
* Move question to questions folder

* Aggregate update result functions

* Use lodash to compare list of objects

* Remove favorites from tables

* Add a workspace parameter

* Move question after result log

* Improve logging

* Code review returns

* Add only lodash.isequal
2023-11-07 11:10:14 +01:00
martmull
ba69435339
0.2.0 cleaning script (#2342)
* Display maxUpdatedAt for each workspace Schema

* Factorize functions

* Add max update for public workspaces

* Merge everything in a single json

* Enrich results

* Get from proper table

* Update

* Move to proper command file

* Add a dry-run option

* Remove workspaces from database

* Fix DeleteWorkspace method

* Add new option

* Remove proper data when deleting workspace

* Minor improvements
2023-11-06 23:15:02 +01:00
Jérémy M
3432615a17
fix: small tenant refactor fixes (#2375) 2023-11-06 15:49:06 +01:00
Jérémy M
1ed4965a95
feat: refactor schema builder and resolver builder (#2215)
* feat: wip refactor schema builder

* feat: wip store types and first queries generation

* feat: refactor schema-builder and resolver-builder

* fix: clean & small type fix

* fix: avoid breaking change

* fix: remove util from pg-graphql classes

* fix: required default fields

* Refactor frontend accordingly

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-11-03 17:16:37 +01:00
Charles Bochet
b4af15467f Fix data not loading on recordTable 2023-11-03 14:53:11 +01:00
Weiko
b56f6f3947
Fix seeds for local workspace and newly created workspaces (#2333)
* Update metadata/data seeds

* fix

* fix

* move seeding into a transaction

* add no-non-null-assertion

---------

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2023-11-03 14:33:45 +01:00
Lucas Bordeau
cf8840dfec
Fix assert not null lint warning (#2324) 2023-11-03 11:08:14 +01:00
bosiraphael
2abcd97c92
Fix view fields seeds (#2300)
* fix view-fields seeds

* closeDate was duplicated
2023-10-31 16:34:28 +01:00
bosiraphael
dda911fea7
Remove three old env variables (#2297)
* remove three old env variables IS_DATA_MODEL_SETTINGS_ENABLED IS_DEVELOPERS_SETTINGS_ENABLED FLEXIBLE_BACKEND_ENABLED

* Fix database:reset script

* Removing unused variable

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-10-31 13:15:24 +01:00
Jérémy M
80a6223d7d
feat: custom objects delete one (#2278)
* feat: custom objects delete one

* fix: delete one issue
2023-10-30 12:05:03 +01:00
Charles Bochet
d38497c46a
Refactor ObjectDataTable to work with new views system (#2274)
Complete work
2023-10-29 23:50:59 +01:00
Charles Bochet
9bab28912d
Complete Fix view work (#2272)
* Fix views

* Make view sorts and view filters functional

* Complete Company table view fix

* Fix model creation

* Start fixing board

* Complete work
2023-10-29 16:29:00 +01:00
Charles Bochet
685d342170
Migrate view field to new data model - Part 2 (#2270)
* Migrate view field to new data model

* Migrate view fields to new model
2023-10-28 19:13:48 +02:00
Charles Bochet
b591023eb3
Fix/metadata object and settings post merge (#2269)
* WIP

* WIP2

* Seed views standard objects

* Migrate views to the new data model

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2023-10-28 12:25:43 +02:00
martmull
35237c05f3
Fix cache management (#2264) 2023-10-27 18:20:11 +02:00
Weiko
acbcd2f162
Standard migration command (#2236)
* Add Standard Object migration commands

* rebase

* add sync-tenant-metadata command

* fix naming

* renaming command class names

* remove field deletion and use object cascade instead

---------

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2023-10-27 18:08:59 +02:00
Thaïs
e488a87ce4
feat: save edited custom field (#2245)
Closes #2161

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2023-10-27 18:06:31 +02:00