Setup
MySQL
The application is compatible with (most) databases with a DBI interface. It’s been tested with MySQL and PostgreSQL. The production application uses a hosted instance of Aurora (MySQL) on AWS RDS. See below for the table schemaa. You may wish to use a connection manager, such as ProxySQL, to collate and proxy application instance connections to your Database server. The application has been tested with ProxySQL v2.3.2.
Creating MySQL database and tables
CREATE DATABASE `c19r` /*!40100 DEFAULT CHARACTER SET utf8 */;
-- c19r.risk_game_results definition
CREATE TABLE `risk_game_results` (
int(11) NOT NULL,
`GEOID` varchar(100) NOT NULL,
`data_ts` int(11) NOT NULL,
`pred_20` int(11) NOT NULL,
`pred_50` int(11) NOT NULL,
`pred_100` int(11) NOT NULL,
`pred_1000` int(11) NOT NULL,
`g_20` int(11) NOT NULL,
`g_50` int(11) NOT NULL,
`g_100` int(11) NOT NULL,
`g_1000` varchar(100) DEFAULT NULL,
`ip` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ts` float DEFAULT NULL,
`latitude` float DEFAULT NULL,
`longitude` varchar(100) DEFAULT NULL,
`utm_source` varchar(100) DEFAULT NULL,
`utm_medium` varchar(100) DEFAULT NULL,
`utm_content` varchar(100) DEFAULT NULL
`utm_campaign` =InnoDB DEFAULT CHARSET=utf8;
) ENGINE
-- c19r.willingness definition
CREATE TABLE `willingness` (
varchar(100) NOT NULL,
`source` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`ts` int(11) NOT NULL,
`asc_bias` int(11) NOT NULL,
`event_size` varchar(40) NOT NULL,
`answer` varchar(100) DEFAULT NULL,
`ip` varchar(100) DEFAULT NULL,
`data_ts` varchar(100) DEFAULT NULL,
`vacc_imm` float DEFAULT NULL,
`latitude` float DEFAULT NULL,
`longitude` varchar(100) DEFAULT NULL,
`utm_source` varchar(100) DEFAULT NULL,
`utm_medium` varchar(100) DEFAULT NULL,
`utm_content` varchar(100) DEFAULT NULL
`utm_campaign` =InnoDB DEFAULT CHARSET=utf8; ) ENGINE