Which ORM or db design process


After some projects done with symfony, I’m giving Slim Framework a try. I need to setup a database, but I’m not sure about the approach to choose.

With symfony and doctrine ORM, database schema was defined only once in a central place (php model files, or xml/yml config). Then, it was easy to generate the sql creation/migration scripts, and choose between mysql, sqlite and postgres.

With Slim Framework, there are some docs about eloquent but I’m missing the commands to generate the sql commands.

I’m therefore wondering how you here usually deal with the database schema creation. Do you use specific tools like mysql workbench or some other db agnostic tool ?

Right now, I’m thinking of using doctrine (like that : http://blog.sub85.com/slim-3-with-doctrine-2.html) or Phinx (like this : https://siipo.la/blog/how-to-use-eloquent-orm-migrations-outside-laravel).


Slim is just a framework to handle the request/response task. There is no database library included, so you can use whatever you want.

If you a specificly looking for a tool to setup/provision your database; I have been using phinx for a while and it does the job for me :slight_smile: But since you already seem to know Doctrine that might be the better choice for you.