start setting up a local dev database

This commit is contained in:
Emi Matchu 2020-09-18 05:24:03 -07:00
parent fa8de52d81
commit 68b7beae1b
4 changed files with 200 additions and 1 deletions

View file

@ -40,9 +40,13 @@
"build": "yarn build-cached-data && react-app-rewired build",
"test": "react-app-rewired test --env=jsdom",
"eject": "react-scripts eject",
"setup-mysql": "mysql -h impress.openneo.net -u matchu -p < setup-mysql.sql",
"mysql": "mysql --host=impress.openneo.net --user=$(dotenv -p IMPRESS_MYSQL_USER) --password=$(dotenv -p IMPRESS_MYSQL_PASSWORD) --database=openneo_impress",
"mysql-dev": "mysql --host=localhost --user=impress_2020_dev --password=impress_2020_dev --database=impress_2020_dev",
"mysql-admin": "mysql --host=impress.openneo.net --user=matchu --password --database=openneo_impress",
"mysqldump": "mysqldump --host=impress.openneo.net --user=$(dotenv -p IMPRESS_MYSQL_USER) --password=$(dotenv -p IMPRESS_MYSQL_PASSWORD) --column-statistics=0",
"download-mysql-schema": "yarn --silent mysqldump openneo_impress species species_translations colors color_translations > scripts/setup-mysql-dev-constants.sql && yarn --silent mysqldump --no-data openneo_impress items > scripts/setup-mysql-dev-schema.sql",
"setup-mysql": "yarn mysql-admin < scripts/setup-mysql.sql",
"setup-mysql-dev": "yarn mysql-dev < scripts/setup-mysql-dev-constants.sql && yarn mysql-dev < scripts/setup-mysql-dev-schema.sql",
"build-cached-data": "node -r dotenv/config scripts/build-cached-data.js",
"cache-asset-manifests": "node -r dotenv/config scripts/cache-asset-manifests.js",
"export-users-to-auth0": "node -r dotenv/config scripts/export-users-to-auth0.js"

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,56 @@
-- MySQL dump 10.13 Distrib 8.0.21, for osx10.15 (x86_64)
--
-- Host: impress.openneo.net Database: openneo_impress
-- ------------------------------------------------------
-- Server version 5.5.62-0ubuntu0.14.04.1-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `items`
--
DROP TABLE IF EXISTS `items`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `items` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`zones_restrict` text COLLATE utf8_unicode_ci NOT NULL,
`thumbnail_url` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`category` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`type` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`rarity_index` smallint(6) DEFAULT NULL,
`price` mediumint(9) NOT NULL,
`weight_lbs` smallint(6) DEFAULT NULL,
`species_support_ids` mediumtext COLLATE utf8_unicode_ci,
`sold_in_mall` tinyint(1) NOT NULL,
`last_spidered` datetime DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`explicitly_body_specific` tinyint(1) NOT NULL DEFAULT '0',
`manual_special_color_id` int(11) DEFAULT NULL,
`modeling_status_hint` enum('done','glitchy') COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `objects_last_spidered` (`last_spidered`)
) ENGINE=InnoDB AUTO_INCREMENT=81718 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2020-09-18 5:22:43

View file

@ -27,6 +27,9 @@ GRANT SELECT ON item_outfit_relationships TO impress2020;
GRANT SELECT ON outfits TO impress2020;
GRANT SELECT ON users TO impress2020;
-- mysqldump
GRANT LOCK TABLES ON * TO impress2020;
-- Procedures used in the application
DELIMITER $$