mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 14:37:02 +01:00
Add alembic instructions to readme
This commit is contained in:
parent
b3051ab6bd
commit
d5e5650322
@ -14,6 +14,14 @@ There was a time when Discord doesn't support embedding the chat on a webpage. B
|
||||
Would you like to run your own copy of Titan Embeds? There are two parts that integrate nicely together. The webapp (website) handles the frontend and communication with the database to retrieve server messages, etc. The discordbot (bot) handles the communcation
|
||||
between Discord's websockets and pushing out the data to the database for the webapp. Check out the respective folder for their installation (pay attention to the python versions!) instructions.
|
||||
|
||||
# Database installation
|
||||
To set up the database for it to work with the webapp and the discordbot, one must use **alembic** to *migrate* their databases to the current database state. To do so, please follow these instructions.
|
||||
1. Install alembic with **Python 2.7's pip** `pip install alembic`
|
||||
2. Change your directory to the webapp where the alembic files are located `cd webapp`
|
||||
3. Clone `alembic.example.ini` into your own `alembic.ini` file to find and edit the following line `sqlalchemy.url` to equal your database uri. [See here](http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls) if you need help understanding how database uri works in SQLalchemy.
|
||||
4. In your terminal, run `alembic upgrade head` to upgrade your database tables to the current version on git. As long as there are only *INFO* messages and no errors, you should be fine.
|
||||
5. Check your database tables to see if they are created. If so, you have finished migrating your database! **Remember to run *Step 4* every now and then just in case if there are database updates.** (Presumably on every `git pull`).
|
||||
|
||||
|
||||
## Join us!
|
||||
Come and talk with us at our very own [discord server](https://discord.gg/z4pdtuV)! We offer support too!
|
||||
|
Loading…
Reference in New Issue
Block a user