Add users and closet_hangers to local db schema
This commit is contained in:
parent
acdf6209ca
commit
0dcbe6fc2d
3 changed files with 51 additions and 3 deletions
|
@ -46,7 +46,7 @@
|
||||||
"mysql-dev": "mysql --host=localhost --user=impress_2020_dev --password=impress_2020_dev --database=impress_2020_dev",
|
"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",
|
"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",
|
"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 --no-data openneo_impress items item_translations modeling_logs parents_swf_assets pet_types pet_states swf_assets | sed 's/ AUTO_INCREMENT=[0-9]*//g' > scripts/setup-mysql-dev-schema.sql && yarn --silent mysqldump openneo_impress species species_translations colors color_translations zones zone_translations > scripts/setup-mysql-dev-constants.sql",
|
"download-mysql-schema": "yarn --silent mysqldump --no-data openneo_impress closet_hangers items item_translations modeling_logs parents_swf_assets pet_types pet_states swf_assets users | sed 's/ AUTO_INCREMENT=[0-9]*//g' > scripts/setup-mysql-dev-schema.sql && yarn --silent mysqldump openneo_impress species species_translations colors color_translations zones zone_translations > scripts/setup-mysql-dev-constants.sql",
|
||||||
"setup-mysql": "yarn mysql-admin < scripts/setup-mysql.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",
|
"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",
|
"build-cached-data": "node -r dotenv/config scripts/build-cached-data.js",
|
||||||
|
|
|
@ -189,4 +189,4 @@ UNLOCK TABLES;
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2020-10-06 6:59:56
|
-- Dump completed on 2020-10-22 19:52:46
|
||||||
|
|
|
@ -15,6 +15,30 @@
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `closet_hangers`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `closet_hangers`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `closet_hangers` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`item_id` int(11) DEFAULT NULL,
|
||||||
|
`user_id` int(11) DEFAULT NULL,
|
||||||
|
`quantity` int(11) DEFAULT NULL,
|
||||||
|
`created_at` datetime DEFAULT NULL,
|
||||||
|
`updated_at` datetime DEFAULT NULL,
|
||||||
|
`owned` tinyint(1) NOT NULL DEFAULT '1',
|
||||||
|
`list_id` int(11) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `index_closet_hangers_on_list_id` (`list_id`),
|
||||||
|
KEY `index_closet_hangers_on_user_id` (`user_id`),
|
||||||
|
KEY `index_closet_hangers_on_item_id_and_owned` (`item_id`,`owned`),
|
||||||
|
KEY `index_closet_hangers_test_20131226` (`user_id`,`list_id`,`item_id`,`owned`,`created_at`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `items`
|
-- Table structure for table `items`
|
||||||
--
|
--
|
||||||
|
@ -173,6 +197,30 @@ CREATE TABLE `swf_assets` (
|
||||||
KEY `swf_assets_type_and_id` (`type`,`remote_id`)
|
KEY `swf_assets_type_and_id` (`type`,`remote_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `users`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `users`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `users` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`auth_server_id` tinyint(4) NOT NULL,
|
||||||
|
`remote_id` int(11) NOT NULL,
|
||||||
|
`points` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`beta` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
|
`remember_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`remember_created_at` datetime DEFAULT NULL,
|
||||||
|
`image_mode_tester` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
|
`owned_closet_hangers_visibility` int(11) NOT NULL DEFAULT '1',
|
||||||
|
`wanted_closet_hangers_visibility` int(11) NOT NULL DEFAULT '1',
|
||||||
|
`contact_neopets_connection_id` int(11) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
@ -183,4 +231,4 @@ CREATE TABLE `swf_assets` (
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2020-10-06 6:59:49
|
-- Dump completed on 2020-10-22 19:52:36
|
||||||
|
|
Loading…
Reference in a new issue