- We keep "unpatched" versions of the SQL and DBS files in the repository
- We keep fully patched versions of the SQL, DBS, and HTML files in the repository
- We keep a patch files for each patch as required in a "patches" directory, named with a 4-digit number (e.g., 0000.sql)
The developer workflow for making changes to the database schema will be:
- Load the fully patched DBS file (e.g.,
amgut/db/ag.dbs
). - Make desired changes.
- Select
Compare Schemas with Other Project From File
from theSchema
menu. - Compare against
amgut/db/ag.dbs
. - Click the button to prefer all of your new changes.
- This will prompt a window asking for the "Editor Name", write the filename for the next patch (e.g. if the newest patch is 0011.sql, you should write 0012.sql).
- Edit the patch file and add general comments including a date, and (where necessary) specific comments.
- Save the
.dbs
file. - Regenerate the HTML schema (go to Project > Export as ... > Html 5 Vector Image).
One drawback is that developers will need to have DBSchema to develop for this project.
If you need to submit a patch that changes only data but does not alter the schema, you should still create a patch file with the next ordinal name (e.g., 0002.sql) with your changes.