2 Replies Latest reply on Jun 23, 2011 4:31 PM by aalbagarcia

    Database versioning

    aalbagarcia

      Title

      Database versioning

      Post

      I´m quite new to filemaker. I´m a web developer (PHP and MySQL) and I´m starting my first proyects using this amazing tool.

      Comming from the MySQL world, we I´m used to work in a development developement environment with it´s own database. Once finished, we run migration scripts in production to upgrade the database when necesary. Are there any good practices for doing this in FileMaker? At the moment, any change we do in the development database has to be reproduced in the production one by hand.

      Thanks in advance.

        • 1. Re: Database versioning
          philmodjunk

          Adding a field in a utility table to track the version of each file in your system is a good idea.

          Two options, (you'll need both) are used to make transition from a older to a newer version of your database system easier for the user:

          Option 1: Split your file into at least two files: A data file that stores all the data and an interface file that holds all the layouts, scripts, value lists, etc. The interface file uses table occurrences with external data source references to the tables in the data file. Since many updates only require changes to the interface file, such updates can be deployed by simply switching out the old interface file for the new.

          Convert to Seperation Model

          Option 2: Create scripts that import all records from all tables in the older version into the newer. This script should also use Set Next Serial Value to update serial number fields to a value greater than the greatest serial number in the records so imported to avoid the creation of duplicate serial numbers after the import. Given an annoying limitation of Import Records, it's best to distribute your original version with a "prepare for import" script that does a show all records in every table of the file, this script can be performed from the upgrade copy to make sure that all records are successfully imported.

          • 2. Re: Database versioning
            aalbagarcia

            Thanks for your answer!!