Open CBroz1 opened 1 year ago
Related to this issue: https://github.com/LorenFrankLab/spyglass/issues/453
I think I mistakenly moved this to a discussion, but we should definitely fix this and agree with option 2 if it can be done safely.
Just noticed that Loren suggested just removing common_backup.py. I think we can at least safely not put it in the init, but we could also just consider removing it all together.
@CBroz1 @akgillespie8 I was the one who made the common_backup when I was migrating some tables. I don't think we need those tables anymore and I agree that we should drop them and get rid of common_backup.py
Same problem is happening in:
LFPArtifactDetectionParameters in LFPV1
DLCPosSelection
ArtifactDetectionSelection
Looks like each of these has long varchars in the primary key, but they're not unique, so I don't know why these in particular cause issues. nwb_file_name: varchar(255)
occurs throughout the database.
Given that alter
only works on non-primary, we would need to declare intermediate tables upstream of each to inherit as secondary keys on an index, and do database surgery to implement
Paths forward include
varchars
and reducing the number of primary keys within offending tables I'm in favor of making adjustments to spyglass itself, as this would make it more user-friendly
This remains an issue with the production database but not spyglass itself. I hit some roadblock in a python tree search. Next phase will be to try to edit backup files and restore from there
common_backup has some unnecessarily long primary keys with
varchar(500)
. @akgillespie8 found this to be an issue when declaring tables for her MySQL instance. We should either...Given that the current max length of entries is 60, I think we can safely do the latter. I suggest
varchar(128)