Issue 487 db

This is ready for initial review. Thanks. 
I don't think you can have it structured exactly like that (since there will be one current for each type, e.g., `("raw_data", true)`, but then potentially many other rows with `("raw_data", false)`, thus violating the proposed unique constraint).  However, I agree in principle that being able to select a current data_directory for each data type will be good for the reasons you mention.