Recently, I was working on improving performance for a FileMaker solution that had a large web integration. It was decided that the best approach was to move a few primary tables from FileMaker to mySQL using ESS.
Of course, we had to maintain all business logic associated with those FM tables after moving them to mySQL. Here’s my normal process for this:
- Run a DDR (Database Design Report – available with FileMaker Advanced) pre-migration to mySQL
- Setup DSN to mySQL
- Change table occurrences of affected tables to new mySQL tables
- Use DDR to search for all references to affected tables and adjust any misaligned fields used in scripts or displayed on layouts, relationships, etc
The process works well, although it is, at times, painstakingly slow. Once I change the underlying base table of the affected table occurrences, any relationships, security, scripts, and even fields displayed on layouts, often change and need to be fixed. I’ve always wondered if there was a way to maintain all the dependencies when making such a change; yesterday, the light went on thanks to some work I was doing with Roger Jacques. Before I get into those details, I want to point out that the mySQL schema, in this case, was a mirror of the FM tables (same table names and same field names).
What We Discovered
I should point out that I’m not a mySQL admin, nor do I have much experience with mySQL outside of ESS integrations. That said, Roger was using a free tool called Sequel Pro to manage what he was doing with mySQL. It turns out, that if you sort your FileMaker fields by creation order, and then use Sequel Pro to arrange (drag/drop) the mySQL table columns to match the creation order of the fields in FileMaker, dependencies are maintained.
It is still important to check the DDR (as mentioned in my process above). However, we maintained all relationships, scripts, and layout objects when we did this. This made my day and greatly improved the amount of time I spent on thsi process.
Be Aware of Shadow Tables
While the process is simple, it is important to know that when using ESS, FileMaker creates a shadow table. This shadow table is used in relationships, etc., and must be correct. If you are working in the Manage Database and change a table occurrence to a mirror based on mySQL, you should NOT see any changes to fields used in relationships. If you do, you need to cancel out of the Manage Database. This will delete the shadow table which is necessary. Then, simply check the column order in Sequel Pro and try again.
FileMaker mySQL Support and Innovation
If you have questions about using FileMaker mySQL or need support in your next development project, please contact our team. As a FileMaker Platinum Partner, we’ve helped thousands of companies organize their FileMaker solutions. We’d love to help you achieve your goals on the platform.