Database Migration from 2.0 to 3.0

I would like to upgrade my ghost site from V 2.25.1 to 3.2.0.
My site has high traffic and it is necessary to avoid any downtime and
its critical to always have a working solution to fall back on when updating.
Therefore I would send users to a cloned image running old 2.25.1 when updating (blue/green deployment). Both sites will access the same database.
I have been reading https://ghost.org/blog/database-migrations/ and it says that Database Migration can result in “You will need to create a new database” error. My question with this circumstances is:
Would database migration result in breaking the cloned old site (2.25.1) when updating master server to 3.2.0 ? If yes. Is it possible to avoid this without adding an independent database for cloned version?

Anyone know?

Hey @droabsy :wave:

The blog post you’re referencing is from 2013 and is quite out of date. The migrations are now programmatically executed using knex-migrator with support for rollbacks upon failed migrations.

While running 2 instances of Ghost is not supported due to app-specific caching layers, as long as you’re not writing to the app (making Admin API requests), you should, in theory, be fine.

Ghost runs migrations on boot, so the amount of downtime you have should be minimal (for smaller sites, it’s not even perceptible) if you do a normal upgrade. There’s no guarantee that your 2.25.x instance will function the same while migrations are running due to race conditions and different table structures. Your best bet for something like this would be to add a cache in front of Ghost that intercepts requests. This is currently the only officially supported way to scale Ghost