diaToPropelPlugin - 0.2.2

The diaToPropel plugins provides xsl transformations to convert a dia UML diagram into valid propel schema, and backwise.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source

diaToPropel plugin

The diaToPropelPlugin is a helpful tool for database design.

It is a propel based symfony plugin, providing the ability to convert existing or reverse engineered propel schema files to a Dia compatible UML file. The Dia file can be used to visualize the database. The plugin also provides support to convert from a Dia file to a propel schema.

Both yml and xml format is supported.


From propel schema to Dia

  • Build your Dia file from xml(s)

    $ symfony propel:propel-to-dia myModel.dia
  • Build your Dia file from yml(s)

    $ symfony propel:propel-to-dia myModel.dia --y='true'

    It is enough to provide only the name of the file the extension will be added automatically.

From Dia to propel schema

  • Build your schema xml(s) from Dia

    $ symfony propel:dia-to-propel myModel.dia
    $ symfony propel:dia-to-propel myModel.dia --s='true'
  • Build your schema yml(s) from Dia

    $ symfony propel:propel-to-dia myModel.dia --y='true'
    $ symfony propel:propel-to-dia myModel.dia --y='true' --s='true'

    Using s(plit) will generate a [table-name]-schema.xml/yml for every table defined.

Dia syntax

  • Class stereotype equals to phpName
  • Columns are properties of the class
    • the type of the property refers to the type of the column
    • the value of the property provides the default value of the column - autoIncrement is supported
  • Indexes and keys are methods of the class

    • the name of the function identifies the type of the key - it may be primaryKey, foreignKey, index or unique
    • arguments of the function represent the columns involved in the key or index
    • for indexes and primaryKeys the arguments must not have a type
    • for foreignKeys the second argument, representing the foreign column ,must have the foreign table name as its type.
    • on foreignKeys the onDelete attribute may be set using the method's stereotype property

    The image below shows the schema of sfGuardPlugin drawn in Dia.

dia example


  • integrate with an SQL diff plugin
  • add support for visualizing schema's defined in plugins