Multiple bots connected to same db

I have tried only on MySQL Database.
To add extra columns in events table following approach worked for me.

First I have added a key to tracker_store in endpoints.yml for MySQL Database , the key name I used is Bot_id

and in rasa/core folder you will find tracker_store.py file you need to add the following code in SQLTrackerStore Class

I didn’t know how to pass the Bot_id to save method, that is why declared a global variable and stored the Bot_id in it.

In the same SQLTrackerStore Class you find save method, add the following variable before commit().

image

Bot_id column and value added to MySQL Database.

3 Likes