How could I fetch all the information about all the models or tables I have in the database using Doctrine 1.2 in Symfony 1.4.
I need to make a demo about capifony/git/migrations. So I want for an user to perform the following:
- clone the repository
- make a change on the template (any text)
- change schema.yml and generate the migrations-diff
- deploy
So I need to list all the models or tables and each with its columns. In order to demonstrate that the process works
Doctrine_Connectionhas a function calledgetTables(), I assume you can get a list of the tables on that connection calling it. According to this it returns an array ofDoctrine_Tableinstances.That class contains an array of its column definitions, which you can retrieve by calling
getColumns().I hope that’s enough to get you started.