Ecto Schema Generator

I was looking for a tool like this too. Something that worked much like django’s inspect.db. I ended up writing some one off scripts and using phoenix’s mix phx.gen.schema.

You can obtain information about your database using something like:

select *
from INFORMATION_SCHEMA.TABLES
where table_schema = 'database';

and

select *
from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME = 'table_name';

I still ended up doing plenty manual work but this did save a lot of time. It was a one off thing it didn’t bother me too much. I don’t know how much that helps but it’s another option.