martmull
3190f4a87b
6658 workflows add a first twenty piece email sender ( #6965 )
2024-09-12 11:00:25 +02:00
Weiko and Charles Bochet
7df5f91dc5
Add set custom object is soft deletable command ( #6788 )
...
## Context
Custom object were not automatically created as softDeletable, this has
been fixed in a recent PR.
This PR adds a command to backfill existing custom objects.
We also introduce a baseCommandRunner and ActiveWorkspacesCommandRunner
to put some boilerplate and simplify future commands.
## Test
```bash
yarn command:prod upgrade-0-24:set-custom-object-is-soft-deletable
[Nest] 75852 - 08/29/2024, 5:16:41 PM LOG [SetCustomObjectIsSoftDeletableCommand] Running command on 2 workspaces
query: UPDATE "metadata"."objectMetadata" SET "isSoftDeletable" = $1, "updatedAt" = CURRENT_TIMESTAMP WHERE ("workspaceId" IN ($2, $3) AND "isCustom" = $4 AND "isSoftDeletable" = $5) -- PARAMETERS: [true,"3b8e6458-5fc1-4e63-8563-008ccddaa6db","20202020-1c25-4d02-bf25-6aeccf7ea419",true,false]
[Nest] 75852 - 08/29/2024, 5:16:41 PM LOG [SetCustomObjectIsSoftDeletableCommand] Updated 1 entities
[Nest] 75852 - 08/29/2024, 5:16:41 PM LOG [SetCustomObjectIsSoftDeletableCommand] Command completed!
```
```bash
yarn command:prod upgrade-0-24:set-custom-object-is-soft-deletable -d
[Nest] 75424 - 08/29/2024, 5:16:14 PM LOG [SetCustomObjectIsSoftDeletableCommand] Running command on 2 workspaces
[Nest] 75424 - 08/29/2024, 5:16:14 PM LOG [SetCustomObjectIsSoftDeletableCommand] Dry run mode: No changes will be applied
query: SELECT "ObjectMetadataEntity"."id" AS "ObjectMetadataEntity_id" FROM "metadata"."objectMetadata" "ObjectMetadataEntity" WHERE (("ObjectMetadataEntity"."workspaceId" IN ($1, $2)) AND ("ObjectMetadataEntity"."isCustom" = $3) AND ("ObjectMetadataEntity"."isSoftDeletable" = $4)) -- PARAMETERS: ["3b8e6458-5fc1-4e63-8563-008ccddaa6db","20202020-1c25-4d02-bf25-6aeccf7ea419",true,false]
[Nest] 75424 - 08/29/2024, 5:16:14 PM LOG [SetCustomObjectIsSoftDeletableCommand] Dry run: 1 entities would be updated
[Nest] 75424 - 08/29/2024, 5:16:14 PM LOG [SetCustomObjectIsSoftDeletableCommand] Command completed!
```
```bash
yarn command:prod upgrade-0-24:set-custom-object-is-soft-deletable -w 20202020-1c25-4d02-bf25-6aeccf7ea419 -w 20202020-1c25-4d02-bf25-6aeccf7ea419
query: UPDATE "metadata"."objectMetadata" SET "isSoftDeletable" = $1, "updatedAt" = CURRENT_TIMESTAMP WHERE ("workspaceId" IN ($2, $3) AND "isCustom" = $4) -- PARAMETERS: [true,"20202020-1c25-4d02-bf25-6aeccf7ea419","20202020-1c25-4d02-bf25-6aeccf7ea419",true]
[Nest] 70588 - 08/29/2024, 5:11:31 PM LOG [SetCustomObjectIsSoftDeletableCommand] Updated 2 entities
[Nest] 70588 - 08/29/2024, 5:11:31 PM LOG [SetCustomObjectIsSoftDeletableCommand] Command completed!
```
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2024-08-31 17:49:12 +02:00
Raphaël Bosi
e771793626
6655 remove field direction in message and add it in mcma ( #6743 )
...
Closes #6655
- Remove direction from message
- Add direction do mcma
- Create migration command
- Create upgrade 0.24
2024-08-27 19:11:04 +02:00
Charles Bochet
17a1760afd
Improve performance twenty orm ( #6691 )
...
## Context
As we grow, the messaging scripts are experiencing performance issues
forcing us to temporarily disable them on the cloud.
While investigating the performance, I have noticed that generating the
entity schema (for twentyORM) in the repository is taking ~500ms locally
on my Mac M2 so likely more on pods. Caching the entitySchema then!
I'm also clarifying naming around schemaVersion and cacheVersions ==>
both are renamed workspaceMetadataVersion and migrated to the workspace
table (the workspaceCacheVersion table is dropped).
2024-08-20 19:42:02 +02:00
martmull
10817c5388
Fix onboarding status refacto ( #6533 )
...
see comments in
https://github.com/twentyhq/twenty/pull/6531#pullrequestreview-2217807413
- rename method
- add check before setting create profile pending user var
2024-08-07 17:09:11 +02:00
bosiraphael
5a72b949d7
6382 create a command to add a uservar in the key value pair table for every account which needs to reconnect ( #6553 )
...
Closes #6382
Create SetUserVarsAccountsToReconnectCommand.
This command loops on all workspaces and:
- deletes all user vars with deprecated key `ACCOUNTS_TO_RECONNECT`
- creates a key value pair of type `USER_VAR` with a key of
`ACCOUNTS_TO_RECONNECT_INSUFFICIENT_PERMISSIONS` for all connect
accounts with a message channel or calendar channel with status
`FAILED_INSUFFICIENT_PERMISSIONS`
2024-08-07 11:43:18 +02:00
Charles Bochet
1b9d2c8151
Release 0.23 ( #6547 )
...
Here we go!
https://twenty.com/releases
2024-08-05 23:18:44 +02:00
Charles Bochet
03204021cb
Refactor onboarding user vars to be absent when user is fully onboarded ( #6531 )
...
In this PR:
- take feedbacks from: https://github.com/twentyhq/twenty/pull/6530 /
https://github.com/twentyhq/twenty/pull/6529 /
https://github.com/twentyhq/twenty/pull/6526 /
https://github.com/twentyhq/twenty/pull/6512
- refactor onboarding uservars to be absent when the user is fully
onboarded: isStepComplete ==> isStepIncomplete
- introduce a new workspace.activationStatus: CREATION_ONGOING
I'm retesting the whole flow:
- with/without BILLING
- sign in with/without SSO
- sign up with/without SSO
- another workspaceMembers join the team
- subscriptionCanceled
- access to billingPortal
2024-08-04 20:37:36 +02:00
Charles Bochet
76185c2f68
Add command to backfill new onboarding user vars ( #6526 )
...
As per our guideline to maintain a smooth migration to the new minor
versions, this command is backfilling existing workspaces with the 3
userVars used to keep track of user onboarding:
```
ONBOARDING_CONNECT_ACCOUNT_COMPLETE = 'ONBOARDING_CONNECT_ACCOUNT_COMPLETE',
ONBOARDING_INVITE_TEAM_COMPLETE = 'ONBOARDING_INVITE_TEAM_COMPLETE',
ONBOARDING_CREATE_PROFILE_COMPLETE = 'ONBOARDING_CREATE_PROFILE_COMPLETE',
```
2024-08-04 01:04:13 +02:00
martmull and Charles Bochet
7cd5427589
Fix onboarding status performance issues ( #6512 )
...
Updated the onboardingStatus computation to improve performances
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2024-08-04 00:33:33 +02:00
Weiko
5870979bfa
Fix missing encoding in workspace-logo, members, person ( #6510 )
2024-08-02 15:18:48 +02:00
rostaklein and Weiko
a424c63476
file storage workspace id prefix ( #6230 )
...
closes https://github.com/twentyhq/twenty/issues/6155
just an idea, i guess this could work well, but im open for discussion
---------
Co-authored-by: Weiko <corentin@twenty.com >
2024-08-01 18:07:22 +02:00
Charles Bochet
ae7821ce70
Fast follows on new task/note behaviors ( #6477 )
...
In this PR, I'm fixing two issues that we have faced:
- computing a rich text first line in case of the first block content is
not a text
- migrating existing timelineActivities tied to tasks / notes to
linked-tasks / linked-notes during migration command
2024-07-31 17:49:56 +02:00
80c0fc7ff1
Activity as standard object ( #6219 )
...
In this PR I layout the first steps to migrate Activity to a traditional
Standard objects
Since this is a big transition, I'd rather split it into several
deployments / PRs
<img width="1512" alt="image"
src="https://github.com/user-attachments/assets/012e2bbf-9d1b-4723-aaf6-269ef588b050 ">
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
Co-authored-by: bosiraphael <71827178+bosiraphael@users.noreply.github.com >
Co-authored-by: Weiko <corentin@twenty.com >
Co-authored-by: Faisal-imtiyaz123 <142205282+Faisal-imtiyaz123@users.noreply.github.com >
Co-authored-by: Prateek Jain <prateekj1171998@gmail.com >
2024-07-31 15:36:11 +02:00
Marie
b8496d22b6
Do not add 'https' prefix while migrating domainName if source url is empty ( #6471 )
2024-07-31 12:03:49 +02:00
Marie
7fe00b163e
Add logs and fix timestamps in migrate domain command ( #6468 )
2024-07-31 11:23:19 +02:00
bosiraphael and Charles Bochet
cd4263f7fd
6431 create new field activationStatus inside workspace table ( #6439 )
...
Closes #6431
- create new field `activationStatus`
- create migration commands
- add logic to update `activationStatus` on workspace activation and on
stripe subscriptionStatus change
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2024-07-30 12:36:39 +02:00
Marie
8e35edad30
Migrate domainName field from text type to links type ( #6410 )
...
Closes #5759 .
2024-07-30 11:47:37 +02:00
1529148c04
Updated MessageChannelSyncStatus enum: changed COMPLETED to ACTIVE ( #5965 )
...
Fixes #5961
---------
Co-authored-by: bosiraphael <raphael.bosi@gmail.com >
Co-authored-by: Charles Bochet <charles@twenty.com >
2024-07-25 21:17:55 +02:00
Marie
082d55beac
[fix] Migrated links field should be standard ( #6387 )
...
Fixing script + ading logs to sync-metadata
2024-07-24 12:16:14 +02:00
Charles Bochet
6c34ef9a14
Simplify ORM ( #6373 )
...
This PR refactors the ORM-Manager to simplify and unify the datasource
creation. I'm deprecating all usages if InjectWorkspaceDatasource and
InjectWorkspaceRepository as we can't be sure they are up-to-date
2024-07-23 14:13:16 +02:00
Marie
8d33264a7d
Migrate fields of deprecated type LINK to type LINKS ( #6332 )
...
Closes #5909 .
Adding a command to migrate fields of type Link to fields of type Links,
including their data.
2024-07-23 09:57:30 +02:00
Marie
9711a430de
Fix command for sync stage enum ( #6291 )
...
We were missing the default value for syncStage, while it is expected
since indicated in the metadata
2024-07-16 16:50:39 +02:00
Weiko
8eb021531d
Add missing commands to 0.22 ( #6286 )
2024-07-16 16:14:20 +02:00
Marie
ef5657c353
Update boolean command to update existing null values ( #6198 )
...
as per title
2024-07-10 13:09:44 +02:00
Marie
02e5c5ea97
Update boolean field command to skip workspace instead of throwing ( #6196 )
...
as per title
2024-07-10 11:56:30 +02:00
Weiko
881613e8a1
Fix wrong standard id for objectMetadataId in auditLog ( #6180 )
...
Add a new command to delete objectMetadataId fieldMetadata that have a
wrong standard-id. This is because we have fixed the missing
objectMetadataId column but one already exists in the fieldMetadataId
with the wrong table. We should run this command before run the
sync-metadata.
Introduced a new module and command to run all the command associated
with the upgrade to 0.22. Not exactly sure with this structure but
ideally we would like to have only 1 command for version upgrades so
this is a first step.
2024-07-09 17:48:10 +02:00