PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
It is currently Fri Feb 15, 2019 3:10 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Jan 07, 2015 9:34 am 
Forum Newbie

Joined: Tue Dec 16, 2014 10:01 am
Posts: 1
If you are using Propel and you create your database models in Vertabelo, probably you'll find the following instructions useful.

Vertabelo is an online, free tool for visual database design. Once you create a model of your database in Vertabelo, you can generate a Propel schema file from it. To do this you'll have to use VertabeloPropel, a PHP script which converts a Vertabelo XML file into Propel's schema.xml file. The script is available on GitHub.


VertabeloPropel uses Composer to manage project dependencies.

In your project directory create a file composer.json:

"require": {
"vertabelo/vertabelo-propel": "*"

Then run Composer install.

composer install

This will download VertabeloPropel into the vendor directory in your project directory. The script will be in vendor/bin/vertabelo-propel.php file or, for Windows, in vendor\bin\vertabelo-propel.php.bat.

How to use VertabeloPropel

Step 1. Create a database model with Vertabelo.

Step 2. Download the model as an XML file and save it in your project directory (use an option "Export model as XML file" from Vertabelo's tool bar).

Step 3. Generate Propel's schema.xml file. If you want to use the default settings (input file model.xml, output file schema.xml, database name test, default id method native), run

in Windows


in Mac/Linux


If you want to change the defaults, run

in Windows

vendor\bin\vertabelo-propel.php.bat -i model.xml -o schema.xml /
   --database-name bookshop ---default-id-method native

in Mac/Linux

vendor/bin/vertabelo-propel.php -i model.xml -o schema.xml --database-name bookshop --default-id-method native

Step 4. The script generates Propel's schema.xml file.

Step 5. Proceed with your normal Propel application development (or see "How to develop a PHP+MySQL application with Propel and Vertabelo").

Script options

The script options are:

  • --input-file (shortcut -i) location of Vertabelo XML file (default value "model.xml")
  • --output-file (shortcut -o) location of output Propel schema.xml file (default value "schema.xml")
  • --database-name name of the database (default value "test")
  • --default-id-method database's defaultIdMethod. Allowed values are “native” or “none”, default value is "native".
  • --help prints the help message

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group