Skip to main content

How to change the database structure

  • DataAccess
    • ZonalOcrDb.edmx.sql - update initial creation queries
    • ZonalOcrDb.edmx
      • <edmx:StorageModels> -> <EntityType>
      • <edmx:ConceptualModels> -> <EntityType>
      • <EntitySetMapping>
    • Update models in /EntityModel/
  • UpdateDbTool
    • UpdateDbManager.cs
      • create an alter statement
      • create a query that determines if the database is at the new version
      • create a function that calls your alter statement(s)
      • add a version that that calls your previous function
    • This tool will update the user's database when they install the new version of Zonal. To test your changes, set UpdateDbTool as the startup project in Visual Studio and run it. Probably need to be in admin mode
  • Update copy of ZonalOcrDb.sdf