I've had to rethink some of how Dart handles BioChem connections now that I have a better understanding of the process. Initially I included a 'biochem_table' field as part of the 'Mission' table to track what table data was being uploaded to, then I appended '_bcd_d', '_bcs_d', '_bcd_p', '_bcs_p' to whatever that table name was.
When looking at the mission filter page you see the 'Biochem Table' column indicating the base name for the mission after it was first uploaded and used the default "mission name" or a user defined table name:
That's not going to work going forward.
What I want to propose is removing the 'biochem_table' column from the 'Mission' table. Then in the User preferences database, I want to add four columns to the 'BcDatabaseConnection' table (where I track databases a user connects to). I'd like to add a bc_discrete_station_edits, bc_discrete_data_edits , bc_plankton_station_edits, bc_plankton_data_edits columns. Then when a user setups a database connection they can use the defaults I'll provide (standard namings for BioChem data manager accounts) in the database form:
These table names will be editable if the user wants to call them something else, but by default will use the Biochem table names for a biochem data manager account: BCDISCRETEDATAEDITS, BCDISCRETESTATNEDITS, BCPLANKTONDATAEDITS, BCPLANKTONSTATNEDITS
Unfortunately, this will break backwards compatibility with previous versions of Dart when it comes to BioChem loading as it currently works. Old mission databases will be migratable to the newer version with a button click, but newer missions won't be compatible with previous versions of Dart without using the Django Shell to preform a reverse migration.
I've had to rethink some of how Dart handles BioChem connections now that I have a better understanding of the process. Initially I included a 'biochem_table' field as part of the 'Mission' table to track what table data was being uploaded to, then I appended '_bcd_d', '_bcs_d', '_bcd_p', '_bcs_p' to whatever that table name was.
When looking at the mission filter page you see the 'Biochem Table' column indicating the base name for the mission after it was first uploaded and used the default "mission name" or a user defined table name:![image](https://github.com/dfo-mar-odis/dart/assets/3355126/b5417adf-66fe-4466-bb49-2dae397f1f4a)
That's not going to work going forward.
What I want to propose is removing the 'biochem_table' column from the 'Mission' table. Then in the User preferences database, I want to add four columns to the 'BcDatabaseConnection' table (where I track databases a user connects to). I'd like to add a bc_discrete_station_edits, bc_discrete_data_edits , bc_plankton_station_edits, bc_plankton_data_edits columns. Then when a user setups a database connection they can use the defaults I'll provide (standard namings for BioChem data manager accounts) in the database form:![image](https://github.com/dfo-mar-odis/dart/assets/3355126/50dba911-f609-425f-9b6b-6550ebf5aaeb)
These table names will be editable if the user wants to call them something else, but by default will use the Biochem table names for a biochem data manager account: BCDISCRETEDATAEDITS, BCDISCRETESTATNEDITS, BCPLANKTONDATAEDITS, BCPLANKTONSTATNEDITS
Unfortunately, this will break backwards compatibility with previous versions of Dart when it comes to BioChem loading as it currently works. Old mission databases will be migratable to the newer version with a button click, but newer missions won't be compatible with previous versions of Dart without using the Django Shell to preform a reverse migration.
Effectively moving us from Dart 3.x to Dart 4.0.0