-
This may be a stupid question, but can anyone tell me what the bt_xxx tables are for? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Sure. They allow us to find our data when we want to update an ingredient or something. As an example, we ship 14 water profiles by default right now. Let's say the user adds 6 profiles, and then we update our database and add a new profile. The entry in bt_water will be (id,water_id) if (15,21). On the next update if we have to fix that last water profile, we can easily find it in the user's database. They were introduced in 9838ed2. If you dig into I thought we had some basic docs on how to use them, as I need to remember how this works every time I look at it. Apparently, we don't. I should probably fix that. |
Beta Was this translation helpful? Give feedback.
-
Ah, I see, yes that makes sense now. It's like an extra optional ID for the items of data that are shipped with the program. What happens in the (rare?) event that the user has edited, say, the supplied water profile that we want to fix? Do we (can we) detect that, or would their changes by lost by the merge? (Presumably this is why there's a pop-up warning before we do such merges.) |
Beta Was this translation helpful? Give feedback.
-
Another quick question, where does the recipe_children table get used? (I understand that hop_children, fermentable_children, etc get used when we create a copy of a hop, fermentable, etc to add to a recipe, but since we don't add recipes to recipes, I started wondering about recipe_children.) |
Beta Was this translation helpful? Give feedback.
Sure. They allow us to find our data when we want to update an ingredient or something. As an example, we ship 14 water profiles by default right now. Let's say the user adds 6 profiles, and then we update our database and add a new profile. The entry in bt_water will be (id,water_id) if (15,21). On the next update if we have to fix that last water profile, we can easily find it in the user's database.
They were introduced in 9838ed2. If you dig into
Database::updateDatabase
, there is a description of the mechanism but not much else.I thought we had some basic docs on how to use them, as I need to remember how this works every time I look at it. Apparently, we don't. I should probably fi…