5 Replies Latest reply on Feb 25, 2014 7:45 PM by Mark Nongkhlaw

    How to Re-Seed a Database when App Updates

    Matthew Kerry

      I have an app which seeds the database based on a number of JSON files.

       

      The application.rb checks to see if the model is empty and if so loads the data from the file.

       

      The problem is, when the app gets updated, the new data in the JSON files are not populated, as the models are not empty.

       

      Is there an easy way I can re-seed the database when the app is updated?

       

      Thanks!