]>
git.r.bdr.sh - rbdr/lgtm/blob - scripts/setup_database.js
554f8d102059f71739728d459bf4475c5c0d4c52
3 const Config
= require('../config/config');
4 const Mysql
= require('mysql2');
8 internals
.run
= () => {
12 console
.log(' +-----+');
13 console
.log(' | o o | - Loading Good Things Momentarily');
14 console
.log(' +-----+');
15 console
.log(' +---------+');
16 console
.log(' /| [][] |\\');
17 console
.log(' || | |');
18 console
.log(' || | \\c');
19 console
.log(' ^+---------+');
22 const connection
= Mysql
.createConnection(Config
.mysql
);
24 console
.log(`> *BEEP* CREATING TABLE: ${Config.mysql.tableName}!`);
25 connection
.query(`CREATE TABLE ${Config.mysql.tableName} (` +
31 'emoji VARCHAR(255), ' +
33 ') CHARACTER SET utf8mb4', (err
) => {
36 console
.error(`> *BWOOOP* ERROR DETECTED: ${err.message}!`);
40 console
.log('> *BEEP BEEP* SUCCESS!');