Is it possible with datamapper to generate the models from an existing database schema? So, to do the inverse of a migration, which takes the models and generate the sql. What I want is given a database schema generate the models.
Is it possible with datamapper to generate the models from an existing database schema?
Share
At last, I found that till now the best solution is to use
dm-is-reflectiveplugin: https://github.com/godfat/dm-is-reflective.It doesn’t generate the code for DataMapper models reflecting an existing database schema, but its properties access methods are automatically available (as long as you keep using this plugin, of course).
Here is an example of use: