Migrate to v1.0.0-beta.9
Learn how to migrate from v2 to v1.0.0-beta.9
This is a big update on top of the previous versions, but the migration is mainly automated. Since the architecture and database schema changes dramatically, you should first back-up your database before continuing.
Create a back-up of your database before continuing
How to migrate
🔥 Breaking change: This version is built with Node v12.17.0 so make sure you don’t use an older version when setting up the project.
If you used the create-chartbrew-app
CLI tool:
If you cloned the repository do the following:
That’s pretty much it. Your existing charts and connections should work as normal, but you will notice a brand new chart builder interface.
Architectural changes
The following section is just informational - no action required.
Models changes
ApiRequest
has become DataRequest
. A new DataRequest
object will be created for every Dataset
that is trying to get data from somewhere.
All the pagination related fields (paginate
, limit
, etc) have been moved from Chart
to DataRequest
.
Moved connection_id
from Chart
to Dataset
. Now each Dataset
will be associated with a Connection
.
Controllers changes
Lots of improvements here, but the most important one is the ChartController
now having a chart update method that compiles data from all the DatasetControllers
which in turn have an obvious runRequest()
method.
Routes changes
The /apiRequest
route is no more and in turn is replaced by /dataRequest
. The full path is: /project/:project_id/chart/:chart_id/dataRequest
.
New endpoint for Dataset
can now be accessed at /project/:project_id/chart/:chart_id/dataset
.
Since the Dataset
model has a new route, the access control module was updated to restrict unwanted access to this data. Owners, admins and editors have all the access (find
, update
, create
and delete
) and members have only find
access.