How to pin a field photo to a drawing revision in SQLite
python
dev.to
On Tuesday, a crew photographs a doorway on sheet A101. On Thursday, a designer issues a new A101 with the doorway moved. A Friday report that opens the latest A101 shows the photo beside a doorway the crew never saw. The image and both PDFs are intact. The bug is in the join. Here is a small way to reproduce that bug and test a fix. The sample uses fictional projects and runs with Python 3 and its built-in sqlite3 module. Run the three blocks in order in the same Python session, or paste them