# Conversion of a database model from Vertabelo to Propel's schema.xml

**URL:** <https://www.phphelp.com/t/conversion-of-a-database-model-from-vertabelo-to-propels-schema-xml/23874>\
**Category:** The Occasional Tutorial\
**Created:** [January 9, 2015, 12:58pm UTC](https://www.phphelp.com/t/conversion-of-a-database-model-from-vertabelo-to-propels-schema-xml/23874 "2015-01-09T12:58:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamar](https://www.phphelp.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jamar](https://www.phphelp.com/u/jamar)\
**Post date:** [January 9, 2015, 12:58pm UTC](https://www.phphelp.com/t/conversion-of-a-database-model-from-vertabelo-to-propels-schema-xml/23874/1 "2015-01-09T12:58:53Z")

</div>

If you are using Vertabelo to design database models, now you can convert these models from Vertabelo to Propel’s schema.xml and use it in your PHP development.

Once you create a model of your database in Vertabelo, you can use VertabeloPropel, a PHP script which converts a Vertabelo XML file into Propel’s schema.xml file. The script is available on GitHub ([github.com/Vertabelo/VertabeloPropel](http://github.com/Vertabelo/VertabeloPropel)).

Installing

VertabeloPropel uses Composer ([getcomposer.org](http://getcomposer.org)) to manage project dependencies.

In your project directory create a file composer.json:

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

Then run Composer install.

```auto
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.

Using VertabeloPropel script

1. Create a database model with Vertabelo at [vertabelo.com](http://vertabelo.com).

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).

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

```auto
vendor\bin\vertabelo-propel.php.bat
```

in Mac/Linux

```auto
vendor/bin/vertabelo-propel.php
```

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
`

1. The script generates Propel’s schema.xml file.

2. Proceed with your normal Propel application development.

Script options

The script options are:

[ul][_]–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[/ul]

---

<div class="post-metadata">

**Author:** ![astonecipher](https://www.phphelp.com/user_avatar/www.phphelp.com/astonecipher/32/2797_2.png) [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Post date:** [January 10, 2015, 6:29pm UTC](https://www.phphelp.com/t/conversion-of-a-database-model-from-vertabelo-to-propels-schema-xml/23874/2 "2015-01-10T18:29:47Z")

</div>

I’m not really sure where this should go, but I will try here…
