CDRH / sparc

Salmon Pueblo Archaeological Research Collection (SPARC) Rails Site
https://salmonpueblo.org/
0 stars 0 forks source link

Need to add a flag to some tables to indicate strat key 1 or strat key 2 #51

Open karindalziel opened 7 years ago

karindalziel commented 7 years ago

for example in the features table, there are 2 columns:

stratum other strata

These should both be connected through features_strata, but the 1 strata from the stratum column should have a flag of strat key 1 and the multiple strata from other strata should have strat key 2

karindalziel commented 7 years ago

Need: List of tables for which this happens

jduss4 commented 7 years ago

right now "other" is just a string field on all tables where it shows up and isn't joined to anything. I'm not sure what "key 1" and "key 2" mean for the database structure, above.

https://github.com/CDRH/sparc/blob/master/db/schema.rb#L542

karindalziel commented 7 years ago

@jduss4 there will be a new column on the feature_strata table

screen shot 2017-05-08 at 12 14 47 pm

It will be called something like "Key" and will have a value of 1 (for primary) or 2 (for secondary)

So I guess while other was previously a string, it will now be part of the join table

karindalziel commented 7 years ago

And possibly other tables, I need to get info from carrie on how many tables this applies to.

jduss4 commented 7 years ago

My notes from the retreat:

This applies to perishables, features, etc: strat key 1 should be single value strat key 2 may be multivalued There will be a join table that indicates whether a stratum is the primary one or not

jduss4 commented 7 years ago

After speaking with @ccheitman yesterday, the following is how we are moving ahead:

Continue associating features and strata as we have been doing (so use primary stratum / strata, use same feature number for each stratum if they were delineated list), but mark the strata as "primary" for that given record.

Add the "strat_other" values to the strata table and mark as secondary strata. IF record joins at feature level, use feature "none" to associate the secondary strata. ELSE if it joins at the strata level (bone tools, SA), add boolean to those join tables as well and mark as secondary

Either way, add to the model files to quickly filter the secondary strata out so we can easily display only the primary in views, if we wish

jduss4 commented 6 years ago

@ccheitman says this is lower priority than most other issues, so moving to v1.5, this issue is NOT closed