I know it's possible to auto-generate .php files for models by creating tables in the database first. Is it also possible to do it the other way around? So that I can create a model.php file and update my database accordingly so that it creates the table for the model together with its columns?
This works, for example, in doctrine, where you define your models metadata (in a .yml file for example) and then it creates the necessary SQL statements to update the database.