Skip to content
Chris Sweet edited this page Mar 17, 2023 · 3 revisions

Welcome to the pad-naxos wiki!

pad database proposed modifications

Initial changes for Friday 10th March

projects table

  1. add unique id
  2. import old category table

card table

  1. rename category to project. Use id rather than name?
  2. remove columns picture_2_location (645 cards), blob_file_location(436 cards), blob_date (436 cards), camera_type_2 (13 cards), training_set(1159 not default), rectification_code (2355 not default)
  3. rename picture_1_location to raw_file_location?
  4. rename camera_type_1 to camera_type

neural_networks table

Remove old non TF_lite networks. Maybe keep Tensorflow?

Keep all that have a hash and download link? - James

cardinfo and cardassigned tables

Maybe combine these? We have to check both for incoming pads if there is no project or test defined by the user.

  1. Most data is in cardinfo which is written to when they print the pad cards
  2. cardassigned allows a user to manually assign them
  3. cardinfo's assigned_test_id is only 0 or 33 (2 of these with a date of 2019-11-XX) - James

Differences,

  1. cardassigned has project_name, cardinfo has project
  2. cardassigned has notes, cardinfo has comment
  3. Inport cardassigned to cardinfo (which only has 94 records)? We should then sanitize as I know there are some dual assignments.

Tables to remove

categories, cameras, competition, operators, results, saltpad, training_results, exif

Maybe remove analysis and drop the info from the app. We can trivially re-create this information. Talk to Marya in case she wants to look at it?

Long(ish) term changes

James's Thoughts

CardGroup Fields:

  • id: autoincrement
  • user: string
  • date: date (default autogenerated when inserted)
  • offsetX: int/float
  • offsetY: int/float
  • comment: string
  • default_project: foreign key to project.id (nullable)

CardGroupMapping Fields:

  • card_id: foreign key to card.id (unique)
  • group_id: foreign key to card_group.id

Tables to remove

ids, find max in card table

Alembic migrations

  1. https://github.com/PaperAnalyticalDeviceND/web-api/tree/main/src/server/database/migrations/versions

Primary key changes

Change the primary key to id for,

  1. Samples
  2. Tests