Application Versions

App Versioning

The Versions feature allows creating a version of your current app.

Under the Apps tab, locate the needed app and scroll to the Versions section. Click New Version to create a new app version. It is a good idea to enter a version comment to help you identify the version later:

You can restore your project to a certain version or delete a version from the list. Restoring the app to a certain version will restore all data and settings that were in the app at the version creation time.

📘

Good Practice

It's a good idea to create versions during your development. This way if you break something, you will be able to roll back (restore) to the app version that was working.

Releasing a New Version of an Application

In general cases, an Appery.io application consists of the following components:

  • App;
  • Database;
  • Server Code;
  • Server Code Library;
  • Database connection;
  • API Express Project.

The components are linked between each other

  • Application has a link to Database;
  • Application has a link to Server Code;
  • Application has a link to API Express Project;
  • Server Code has a link to Server Code Library;
  • Server Code has a link to Database as Setting of the Security property;
  • Server Code Library has a link to Database;
  • Database Connection has a link to Database;
  • API Express Project has a link to Database Connection;
  • API Express Project has a link to Database as Setting of the Security property.

In order to simplify the migration process, it is recommended that you

  • Store link to Database in Server Code Library
  • Store version of the App in Database and check the version during Application start and in case of versions inconsistency ask a user to update Application
  • If Server Code, Database, or API Express service return the 403 status, the app has to navigate users to the login screen (a prediction is made that app version is checked on the login screen too)

Before starting implementation of V2 of application, clone the whole system.

Cloning all components

  • Create Backup of App V1 and restore from it App V2;
  • Create Backup of Database V1 and restore from it Database V2;
  • Create Backup of Server Code Script V1 and restore from it Server Code Script V2;
  • Create Backup of Server Code Library V1 and restore from it Server Code Library V2;
  • Create Backup of Database Connection V1 and restore from it Database Connection V2;
  • Create Backup of API Express Project V1 and restore from it API Express Project V2.

Link all V2 components within the system

  • Update in App V2 - Database link to V2;
  • Update in App V2 - Server Code link to V2;
  • Update in App V2 - API Express link to V2;
  • Update in Server Code V2 - Database link to V2;
  • Update in Server Code V2 - Database Security setting to V2;
  • Update in Server Code V2 - Server Code Library link to V2;
  • Update in Database Connection V2 - Database link to V2;
  • Update in API Express Project V2 - Database Connection link to V2;
  • Update in API Express Project V2 - Database Security setting to V2.

Now, there are two absolutely identical systems with versions V1 and V2.

During development, components of the system V2 can be changed (updated,
added, deleted).

When the development process is completed, V2 of application should replace V1

  • Enable Maintenance Mode for (Database V1, Server Code V1, API Express Project V1);
  • Invalidate all tokens of Database V1;
  • Create a new version of App V1;
  • Create a new version of Database V1;
  • Update structure of Database V1 (add new columns and collections);
  • Run migration for Database V1;
  • Update Link on Database V1 in App2;
  • Update Link on Database V1 in Server Code Library V2;
  • Update Link on Database V1 in Server Code Security setting V2;
  • Update Link on Database V1 in Database Connection V2;
  • Update Link on Database V1 in API Express project V2;
  • Update App V1 on App V2;
  • Disable Maintenance for Database V1.

Finally, the architecture diagram will be like this:

📘

Want to know more?

You can also check this document to learn how to create a development environment for Ionic projects for debugging the changes in development for the app's next release without endangering the app version in production.