I'm moving my Codeigniter 3.1.4 development environment into a Docker container at the moment. When running a docker image for the first time, I would like Codeigniter to automatically create tables in the database if the database is empty rather than me having to export my current development database and then import it into the Mysql docker.
I already use the migration library during development (via the command-line) to make changes to the database schema. It sounds to me like the migration library would be perfect for this task, but I can't think of where I should call it from. E.g. - do I add some code to the end of database.php to check if the database exists and then call my migration controller somehow?