Update Docker install
Hello, I installed version 0.3.0 and I'm looking for updating the installation to last version.
How can I do that?
Thanks
14 Replies
Ok, so first you should do a dump of your database.
Then, can you run:
node dist/src/command.js workspace:health --workspace-id {YOUR_WORKSPACE_ID} -d
?
We will need to check what's outdated in your schema firstIn the server container right ? How can I find the workspace id ? Is it the workspace "name"?
I backup the "default" database
In your db you should have a workspace table where you can retrieve your id (you most likely only have one row, excluding the ones provided in the seeds if you still have them)
Got it. I have mine and a default "Apple" one
Here it is
mmmh true, you are not on the latest version so you don't have the command yet :p
Ok, so start by doing a dump of your database. Then, update your infra to use 0.3.2 version (pull v0.3.2 branch if you are using git, rebuild your containers id you are using docker...)
It is very likely that this will break your CRM, we will need to make changes to the database to match the 0.3.2 features
in 0.3.1 we have introduced some commands to migrate workspace between versions, they will help for future migrations but they are not there yet on 0.3.0
I can use "TablePlus" to backup my database or do I need to do a specific dump? No worries if I loose my database, I can rebuild it.
Usually I use
pg_dump -U twenty -h localhost -p 5432 -F c default > db.tar
but I don't know if it's enoughAfter I can update like that right ?
oh so you don't care about the data in it? If yes, this is WAY easier :p
I can re-enter the data, it's OK
ok so in this case, just delete your containers and rebuild them π
then re-init your database and you should be good to go!
OK I've successfuly updated and restarted everythong.
But I have an error when I try to initiate the DB
I tried :
OK now I had some sleep, I followed what was said in the error and I run those three commands:
No error anymore, everything seems good.
I have two questions here:
- Can I set something in the .env to have a clean database without companies/people already filled?
- Is there a way to backup (and restore) the datamodel only (without data) using API or even pg_dump?
Great!
- not at the moment but is very easy to clean in your DB, we could also add an environment variable to disable workspace prefill on creation
- pg_dump --schema-only might do the trick