-
Notifications
You must be signed in to change notification settings - Fork 11
2. SQL Setup
Noah Steinberg edited this page Oct 25, 2018
·
7 revisions
In order to connect to Production/Testing on HostGator you need to whitelist your IP, and contact the CTO for the credentials. Otherwise you must install a local instance of mySQL. In both cases, ensure you have the following environment variables set:
- SQL_HOST : host to connect to (likely localhost for dev)
- SQL_PORT : port to connect to on the host
- SQL_USER : user to connect as
- SQL_PASS : password to authenticate with
- SQL_DATABASE : database to connect to
The following is the required schema for the bot. Please notify the CTO if there is any discrepancy between this and what you see.
+---------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-------------+------+-----+---------+-------+
| id | varchar(50) | NO | PRI | | |
| username | varchar(32) | NO | | NULL | |
| discriminator | varchar(4) | YES | | NULL | |
| permissions | int(11) | YES | | NULL | |
| notes | text | YES | | NULL | |
+---------------+-------------+------+-----+---------+-------+
+-------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| role | varchar(255) | NO | PRI | NULL | |
| id | varchar(50) | YES | | NULL | |
| name | varchar(255) | YES | | NULL | |
+-------+--------------+------+-----+---------+-------+
+--------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+-------+
| id | varchar(255) | NO | PRI | NULL | |
| userid | varchar(255) | NO | | NULL | |
| reason | varchar(255) | NO | | NULL | |
+--------+--------------+------+-----+---------+-------+