Migration notes
https://bar-assistant.github.io/docs/setup/migrate-to-30/
Multiple bars
- Bar Assistant now supports multiple bars.
- With this change a lot of endpoints now require to have bar reference, this comes in a form of
bar_id
query parameter - Please refer to the new schema specification to see what endpoints now require
bar_id
query parameter
- With this change a lot of endpoints now require to have bar reference, this comes in a form of
- This update also changed a lot database table schemas, so I advise you to create a backup of your data before you update to v3
- Users can be invited or join with invite code to specific bars
Improved user control
- Users can have one of the following roles in a bar:
- Guest
- Rate and favorite cocktails
- Create personal collections
- General
- Everything as "Guest"
- Can add cocktails and ingredients
- Moderator
- Everything as "General"
- Can not modify bar
- Can not change user roles
- Admin
- Everything as "Moderator"
- Full access to all bar actions
- Guest
Breaking changes
- Updated a lot of schemas, refer to openapi specification to see the changes
- Token response is now wrapped with
data
object like the rest of the endpoints endpoint - Removed POST
shelf/ingredients
endpoint - Removed POST
shelf/ingredients/{ingredientId}
endpoint- Upgrade guide: Use
shelf/ingredients/batch-store
endpoint
- Upgrade guide: Use
- Removed DELETE
shelf/ingredients/{ingredientId}
endpoint- Upgrade guide: Use
shelf/ingredients/batch-delete
endpoint
- Upgrade guide: Use
- Removed
notes
property fromCocktail
schema- Upgrade guide: Use
notes/
endpoint to get users notes
- Upgrade guide: Use
- Removed
glasses/find
endpoint- Upgrade guide: Use
glasses/
endpoint withfilter[name]
query string
- Upgrade guide: Use
- Removed GET
/images
endpoint - Removed
bar:make-admin
command - Removed
bar:open
command - Removed
bar:refresh-user-search-keys
command - Removed
bar:import-zip
command - Removed
bar:export-zip
command - Removed
bar:scrape
command - Renamed
/user
endpoint to/profile
- Renamed
user_id
filter oncocktails
endpoint tocreated_user_id
- Renamed
user_id
filter oningredients
endpoint tocreated_user_id
- Ingredient category is not required anymore when adding an ingredient
New
- Added
bars/
endpoint - Added GET
notes/
endpoint - Stats now have users top 5 favorite ingredients, calculated from favorite cocktails
- Importing cocktails from collection now has actions on how to handle duplicates
- Added
bar:backup {barId}
command - Cocktail ingredient now supports variable amounts, you can add max amount with
amount_max
attribute - Cocktail ingredient now can have a note attached
- Cocktail substitutes now have the following attributes:
ingredient_id
,amount
,amount_max
,units
- Added options on how to handle duplicated recipes when importing collection
- Duplicates are matched by recipe name
- Possible actions:
- Do nothing
- Overwrite duplicated
- Skip duplicates
- Added
average_rating_min
filter tococktails
endpoint - Added
average_rating_max
filter tococktails
endpoint
Changes
- Default database filename changed to
database.ba3.sqlite
- Optimized base images of cocktails and ingredients
- Cocktail and ingredient images are now categorized in folders by bar id
- Merged all migrations to a single one
- Meilisearch API keys are now generating tenant tokens
- Changed the way slugs are generated, they now include bar id
- Changed what attributes are searchable
- Removed from
cocktails
index:garnish
,image_hash
,main_image_id
,user_id
,glass
,average_rating
,main_ingredient_name
,calculated_abv
,method
,has_public_link
- Added to
cocktails
index:bar_id
- Removed from
ingredients
index:strength_abv
,color
- Added to
ingredients
index:bar_id
- Removed from