T
Twentyβ€’6mo ago
charles

Twenty - Releases

πŸŽ‰ 0.4.0 is out! πŸŽ‰ 130 PRs are parts of this one with the help of 30 contributors! https://twenty.com/releases A technical word about migrating from 0.3.3 to 0.4.0 as we have introduced a few breaking changes: 1. We have introduced changes on core and metadata schema to account for multi-workspace 2. We are migrating from timestamp to timestampz date time fields 3. We have changed the way we store default values 4. We have introduced changes on workspace schema table and columns I'm giving more details in the thread on how to migrate
Twenty - Releases
Latest releases of Twenty
5 Replies
charles
charlesβ€’6mo ago
1. Assuming you are using a production image (such as https://hub.docker.com/r/twentycrm/twenty), you'll need to run: yarn command:prod database:migrate:prod 2. Use the following SQL query to generate instruction to manually migrate timestamp to timestampz in workspace postgres schema: SELECT 'ALTER TABLE "' || ds.schema || '"."' || CASE WHEN om."isCustom" THEN '_' || om."nameSingular" ELSE om."nameSingular" END || '" ALTER COLUMN "' || CASE WHEN fm."isCustom" THEN '_' || fm.name ELSE fm.name END || '" TYPE TIMESTAMP WITH TIME ZONE USING "' || CASE WHEN fm."isCustom" THEN '_' || fm.name ELSE fm.name END || '" AT TIME ZONE ''UTC'';' as alter_to_run FROM metadata."fieldMetadata" fm JOIN metadata."objectMetadata" om ON fm."objectMetadataId" = om.id JOIN metadata."dataSource" ds ON om."dataSourceId" = ds.id WHERE fm.type = 'DATE_TIME'; This will give you a list of SQL instruction that you can run to convert your datetime column types 3. Run: yarn command:prod workspace:health -w {yourWorkspaceId} --fix default-value to upgrade your default values 4. Run yarn command:prod workspace:sync-metadata -w {yourWorkspaceId} -f to upgrade your workspace schema These migration steps are still experimental, we will start providing more and more support and tooling to ensure smooth migrations during upgrades If you face any challenge, ping us on #help Have fun with the 0.4.0!
greg [iero]
greg [iero]β€’6mo ago
Is this the same commands when you migrate from 0.3.2?
charles
charlesβ€’6mo ago
yes, you might have additional steps to perform from 0.3.2 to 0.3.3 : mainly with the views (we have introduced a kanbanFieldMetadataId that you'll need to set)
greg [iero]
greg [iero]β€’6mo ago
What is the best way? Can I do direct update from 0.3.2 to 0.4.0 ? I follow the instruction or do I need to do something else before ?
Unknown User
Unknown Userβ€’6mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server