From 37ae99390e31e39c6480a34fd06ba369090e77d3 Mon Sep 17 00:00:00 2001 From: Marie <51697796+ijreilly@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:06:18 +0200 Subject: [PATCH] Add upgrade guide section to webiste (#6294) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...to guide user to transition between versions. --------- Co-authored-by: Félix Malfait --- .../content/developers/constants/DocsIndex.ts | 1 + .../developers/self-hosting/upgrade-guide.mdx | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 packages/twenty-website/src/content/developers/self-hosting/upgrade-guide.mdx diff --git a/packages/twenty-website/src/content/developers/constants/DocsIndex.ts b/packages/twenty-website/src/content/developers/constants/DocsIndex.ts index c3dcbeb80..caa1579cd 100644 --- a/packages/twenty-website/src/content/developers/constants/DocsIndex.ts +++ b/packages/twenty-website/src/content/developers/constants/DocsIndex.ts @@ -6,6 +6,7 @@ export const DOCS_INDEX = { { fileName: 'self-hosting-var' }, { fileName: 'docker-compose' }, { fileName: 'cloud-providers' }, + { fileName: 'upgrade-guide' }, ], }, Extending: { diff --git a/packages/twenty-website/src/content/developers/self-hosting/upgrade-guide.mdx b/packages/twenty-website/src/content/developers/self-hosting/upgrade-guide.mdx new file mode 100644 index 000000000..69528bed3 --- /dev/null +++ b/packages/twenty-website/src/content/developers/self-hosting/upgrade-guide.mdx @@ -0,0 +1,37 @@ +--- +title: Upgrade guide +icon: TbCloud +image: /images/user-guide/notes/notes_header.png +--- + +## General guidelines + +Always make sure to backup your database before starting the upgrade process. + +## If you used Docker Compose + +1. In a terminal, on the host where Twenty is running, turn off Twenty: `docker compose down` + +2. Upgrade the version by changing the `TAG` value in the .env file near your docker-compose. + +3. Bring Twenty back online with `docker-compose up -d` + +## Data Migration + +Migrating a CRM is a bit trickier than migrating a traditional software, because the data model of Standard Object has to evolve smoothly along your custom objects. + +## v0.21.0 to v0.22.0 + +Run the following commands: + +``` +yarn database:migrate:prod +yarn command:prod workspace:sync-metadata -f +yarn command:prod upgrade-0.22 +``` + +The `yarn database:migrate:prod` command will apply the migrations to the Database. +The `yarn command:prod workspace:sync-metadata -f` command will sync the definition of standard objects to the metadata tables and apply to required migrations to existing workspaces. +The `yarn command:prod upgrade-0.22` command will apply specific data transformations to adapt to the new object defaultRequestInstrumentationOptions. + +