start test/dev db IDs at 1, not wherever prod is
We download the schema from prod, and omit real data, but I didn't notice that we were still pulling the metadata of the auto increment counter for IDs! Now, we scrub that from the schema file we save.
This commit is contained in:
parent
71f491ce65
commit
50537758c5
4 changed files with 14 additions and 14 deletions
|
@ -45,7 +45,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 pet_types pet_states swf_assets > scripts/setup-mysql-dev-schema.sql && yarn --silent mysqldump openneo_impress species species_translations colors color_translations > scripts/setup-mysql-dev-constants.sql",
|
"download-mysql-schema": "yarn --silent mysqldump --no-data openneo_impress items item_translations 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 > 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",
|
||||||
|
|
|
@ -133,4 +133,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-09-19 3:34:44
|
-- Dump completed on 2020-09-19 4:00:01
|
||||||
|
|
|
@ -41,7 +41,7 @@ CREATE TABLE `items` (
|
||||||
`modeling_status_hint` enum('done','glitchy') COLLATE utf8_unicode_ci DEFAULT NULL,
|
`modeling_status_hint` enum('done','glitchy') COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `objects_last_spidered` (`last_spidered`)
|
KEY `objects_last_spidered` (`last_spidered`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=81718 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 */;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -65,7 +65,7 @@ CREATE TABLE `item_translations` (
|
||||||
KEY `index_item_translations_on_locale` (`locale`),
|
KEY `index_item_translations_on_locale` (`locale`),
|
||||||
KEY `index_item_translations_name` (`name`),
|
KEY `index_item_translations_name` (`name`),
|
||||||
KEY `index_item_translations_on_item_id_and_locale` (`item_id`,`locale`)
|
KEY `index_item_translations_on_item_id_and_locale` (`item_id`,`locale`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=215780 DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -85,7 +85,7 @@ CREATE TABLE `pet_types` (
|
||||||
`basic_image_hash` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
`basic_image_hash` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `pet_types_species_color` (`species_id`,`color_id`)
|
UNIQUE KEY `pet_types_species_color` (`species_id`,`color_id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=4795 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 */;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -107,7 +107,7 @@ CREATE TABLE `pet_states` (
|
||||||
`artist_neopets_username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
`artist_neopets_username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `pet_states_pet_type_id` (`pet_type_id`)
|
KEY `pet_states_pet_type_id` (`pet_type_id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=28561 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 */;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -136,7 +136,7 @@ CREATE TABLE `swf_assets` (
|
||||||
KEY `swf_assets_body_id_and_object_id` (`body_id`),
|
KEY `swf_assets_body_id_and_object_id` (`body_id`),
|
||||||
KEY `idx_swf_assets_zone_id` (`zone_id`),
|
KEY `idx_swf_assets_zone_id` (`zone_id`),
|
||||||
KEY `swf_assets_type_and_id` (`type`,`remote_id`)
|
KEY `swf_assets_type_and_id` (`type`,`remote_id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=521790 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 */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
|
||||||
|
@ -148,4 +148,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-09-19 3:34:36
|
-- Dump completed on 2020-09-19 3:59:55
|
||||||
|
|
|
@ -492,7 +492,7 @@ Array [
|
||||||
"SELECT * FROM pet_states WHERE (pet_type_id = ? AND swf_asset_ids = ?)",
|
"SELECT * FROM pet_states WHERE (pet_type_id = ? AND swf_asset_ids = ?)",
|
||||||
Array [
|
Array [
|
||||||
Array [
|
Array [
|
||||||
"4795",
|
"1",
|
||||||
"21057,21060,24008,7941,7942,7946",
|
"21057,21060,24008,7941,7942,7946",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -503,7 +503,7 @@ Array [
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
2,
|
2,
|
||||||
"4795",
|
"1",
|
||||||
"21057,21060,24008,7941,7942,7946",
|
"21057,21060,24008,7941,7942,7946",
|
||||||
false,
|
false,
|
||||||
],
|
],
|
||||||
|
@ -589,7 +589,7 @@ Object {
|
||||||
],
|
],
|
||||||
"petAppearance": Object {
|
"petAppearance": Object {
|
||||||
"bodyId": "180",
|
"bodyId": "180",
|
||||||
"id": "28561",
|
"id": "1",
|
||||||
"pose": "SAD_MASC",
|
"pose": "SAD_MASC",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ Array [
|
||||||
ORDER BY (mood_id IS NULL) ASC, mood_id ASC, female DESC,
|
ORDER BY (mood_id IS NULL) ASC, mood_id ASC, female DESC,
|
||||||
unconverted DESC, glitched ASC, id DESC",
|
unconverted DESC, glitched ASC, id DESC",
|
||||||
Array [
|
Array [
|
||||||
"4795",
|
"1",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
|
@ -981,7 +981,7 @@ Array [
|
||||||
"SELECT * FROM pet_states WHERE (pet_type_id = ? AND swf_asset_ids = ?)",
|
"SELECT * FROM pet_states WHERE (pet_type_id = ? AND swf_asset_ids = ?)",
|
||||||
Array [
|
Array [
|
||||||
Array [
|
Array [
|
||||||
"4795",
|
"1",
|
||||||
"21057,21060,24008,7941,7942,7946",
|
"21057,21060,24008,7941,7942,7946",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -992,7 +992,7 @@ Array [
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
2,
|
2,
|
||||||
"4795",
|
"1",
|
||||||
"21057,21060,24008,7941,7942,7946",
|
"21057,21060,24008,7941,7942,7946",
|
||||||
false,
|
false,
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue