NearBeach Logo

Upgrading Database from 0.29 to 0.30

Back to Blogs

Breaking Change with 0.30

NearBeach 0.30 has restructured it's database. This is to counter many problems with both the structure and the code.

Create a new database and structure

The source database won't be edited. Setting up 0.30 on the original database will be too hard and complicated due to the multiple moving parts. It is easier to create a new database to migrate too.

Create a new blank database (we'll call this the destination database). Either apply the old user to this database or create a new one.

Once the database has been created - run the following SQL within it. It will create the schema for NearBeach. Please note - it will delete stuff inside the database.

Create the environment file

Copy the code below and modify the parameters with the appropriate values. This file will be stored next to the python file. The passwords will be referenced and used to log into the source and destination database.

Create a Python Virtual Env

https://virtualenv.pypa.io/en/latest/user_guide.html <- create a virtual environment, and source into it

Install Required Python Libraries

Install the following python libraries using pip

Run the following python script

Download the script below and run it.

Finally - update NearBeach and connect to the new database

Update your NearBeach instance to 0.30, and change the database to the new database. Everything should connect as before. If you have any issues, please visit our discord server.