fix tables names and run migration on init