Versioning
Heads up! These docs are for Portofino 3, which is a legacy product. Check out Portofino 4!
Copyright 2008-2012 ManyDesigns srl. All rights reserved.
Contents
WARNING: this functionality is in beta. Make sure you backup the database and application data files before using it.
Purpose
Versioning allows you to develop your application incrementally by "freezing" the model at significant stages of development.You can save a "safe" version of the model, try experimental changes, and revert to the safe version if you are not satisfied with the changes.
You, as a model, decide when a model is ready to be versioned. There are several approaches you can follow:
- At the end of the main phases, such as data modeling, workflow modeling, etc.
- When a functional area is completed.
- Every day.
- Before starting an experimental feature, which may need to be rolled back.
What is stored in a version?
A version includes the database's structure, data, and metadata, as well as all the BLOB files uploaded.Set-up and configuration
ManyDesigns Portofino uses CVS as the underlying versioning mechanism. Make you have CVS installed on your system before beginning. On MS Windows you can use CVSNT.In CVS there are two "places" where data are stored:
-
The repository: where all versions are stored in a permanent way. Its path is given by theconfiguration property
versioning.cvs.repository
-
The working directory: where the current version is temporarily saved and made available for modifications. Its path is given by the configuration property
versioning.cvs.workingDirectory
-
Create the repository directory and the working directory, e.g.:
mkdir path_to_repository
mkdir path_to_working_directory -
Initialize the repository with:
cvs -d path_to_repository init -
If you share the repository with other projects you have to do this step only once.
-
Choose a short name for your project (e.g., "myproj") and configure the following property:
model.cvs.module=myproj - "Module" is CVS's term for a project in the repository
-
Create a project directory inside the working directory:
mkdir path_to_working_directory/myproj
-
If you intend to use blob attributes create a directory for them:
mkdir path_to_working_directory/myproj/blob
When using versioning, three files will be stored in
path_to_working_directory/myproj
:-
portofinoDDL.sql
: a list of DDL commands that represent the history of operations done by the modeler. -
portofinoDML.sql
: a snapshot of themeta.schema
schema content (a DML's). -
portofinoModelDML.sql
: a snapshot of themetameta.schema
schema content (a DML's).
Finally, set the path where the mdtemplate.sql file is stored. This is needed in case you decide to use versioning to revert to older versions:
versioning.template.location=/path/to/mdtemplate.sql
Adding a version
To add a version:- Go upstairs and click on Versioning. The page performs some background operations and may take a few seconds to load.
- If there are no changes since the last version, the message "No changes" appears and you cannot continue. Otherwise, two buttons are presented: Undo recent changes and Add version.
- Click on Add version.
- Enter a short description of the version.
- Click on Add.
- the version number: an incremental number;
- date: the date when the version was created;
- description: the descriction you've entered;
- a button to revert to this version (see section below).
Undoing recent changes
If you are not satisfied with the changes you've made since the last version, you can undo them:- Go upstairs and click on Versioning.
- Click on Undo recent changes.
Reverting to a previous version
If you want to revert to a previous version:- Go upstairs and click on Versioning.
- In the table of available versions, locate the one that you are interested in.
- Click on its Revert to button.
Previous: Single sign-on
Next: Deployment