AddToDatabase function updated for shifts style autogen table