Import Doctrine2 Project
This short tutorial demonstrates that in Skipper import of existing Doctrine2 project and the following model editing is simple and intuitive.
Hint: See the ORM Model basics for detailed description of ORM elements (e.g. bundle, entity).
First, import sample Doctrine ORM project Bug Tracker or some of your existing projects. To do this select Import ORM Schema Files from File menu and follow the steps shown in the pictures below.
The last screen visually represents Bug Tracker project imported to Skipper and arranged automatically by import algorithm. It is a good starting point to work with your model.
Arrange visual model
Although imported model is automatically arranged it is a good idea to reposition entities inside the bundles to exactly fit the model logic. Also, you can change colors of bundles according to your preferences.
Extend project model
Now that you have a nice visual model we are going to show you how to extend Bug Tracker model to store attachments for Bug reports. We add Attachment entity, configure new fields and create association between Bug and Attachment entity.
Now with updated model it is time to export model back to Doctrine2 schema definition files. Because model is imported from the existing schema files, export is automatically configured to export the data back to these files. Before the first export check that export locations and formats are correct.
Skipper exports single schema file for each Doctrine2 entity. This means that our project will export five schema definition files, one for each entity in the model. Each bundle can have its own export format and path which is relative to project root directory. For Doctrine2 ORM it is XML, YML and annotations.
And here is an example of the new Attachment entity. As you can see, everything is well formatted and exported in Doctrine2 XML format.
Skipper can export schema definitions to all supported Doctrine2 export formats - XML, YML or annotations. When you select annotations format export will look like this:
Next time you will need to make further changes or adjust the model, just open Skipper file and edit your project entities. Then again export the project to ORM.
As you can see above, import, editing and export to schema definition files is a five minute work with Skipper (ten if you are doing it for the first time). Now compare it with the effort of doing such task manually. As you have just discovered Skipper dramatically saves your time and helps you to work with schema definitions in much more enjoyable way.