This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from Data would all be lowercase + fix update …
…data pipeline 1. Tower names, ability names, descriptions, are now all stored in lowercase in the database. The graphql query arguments will be converted to lower case first before we use them to query the database. Updated all tests accordingly. Solves: #79 2. Fix data saving pipeline - Improve code format of scripts - Drop database and user if they exist before creating them - The data saving pipeline was incorrect, we won't be able to resave the data since the current `seed/populate.js` only allows for` inserts` and not `updates`. In the future, I might change this, but since the data isn't that much anyway, the current implementation is that the user is dropped and recreated and all the data are populated all over again #43
- Loading branch information
Showing
24 changed files
with
371 additions
and
360 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
DROP TABLE ability CASCADE; | ||
DROP TABLE "Towers" CASCADE; | ||
DROP TABLE ability_level; | ||
DROP TABLE main_stats; | ||
DROP TABLE attack_stats; | ||
DROP TABLE barracks_stats; | ||
DROP TABLE build_sequence; | ||
DROP TYPE "Towers_towertype_enum"; | ||
DROP TYPE "Towers_level_enum"; | ||
DROP TYPE "Towers_kingdom_enum"; | ||
DROP TABLE migrations; | ||
DROP TABLE IF EXISTS ability CASCADE; | ||
DROP TABLE IF EXISTS "Towers" CASCADE; | ||
DROP TABLE IF EXISTS ability_level; | ||
DROP TABLE IF EXISTS main_stats; | ||
DROP TABLE IF EXISTS attack_stats; | ||
DROP TABLE IF EXISTS barracks_stats; | ||
DROP TABLE IF EXISTS build_sequence; | ||
DROP TYPE IF EXISTS "Towers_towertype_enum"; | ||
DROP TYPE IF EXISTS "Towers_level_enum"; | ||
DROP TYPE IF EXISTS "Towers_kingdom_enum"; | ||
DROP TABLE IF EXISTS migrations; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
\copy "Towers" FROM './data/generated/csv/towers.csv' DELIMITER ',' csv header; | ||
\copy main_stats FROM './data/generated/csv/main-stats.csv' DELIMITER ',' csv header; | ||
\copy attack_stats FROM './data/generated/csv/attacks-stats.csv' DELIMITER ',' csv header; | ||
\copy barracks_stats FROM './data/generated/csv/barracks-stats.csv' DELIMITER ',' csv header; | ||
\copy ability FROM './data/generated/csv/abilities.csv' DELIMITER ',' csv header; | ||
\copy ability_level FROM './data/generated/csv/ability-levels.csv' DELIMITER ',' csv header; | ||
\copy build_sequence FROM './data/generated/csv/build-sequences.csv' DELIMITER ',' csv header; | ||
\COPY "Towers" FROM './data/generated/csv/towers.csv' DELIMITER ',' CSV HEADER; | ||
\COPY main_stats FROM './data/generated/csv/main-stats.csv' DELIMITER ',' CSV HEADER; | ||
\COPY attack_stats FROM './data/generated/csv/attacks-stats.csv' DELIMITER ',' CSV HEADER; | ||
\COPY barracks_stats FROM './data/generated/csv/barracks-stats.csv' DELIMITER ',' CSV HEADER; | ||
\COPY ability FROM './data/generated/csv/abilities.csv' DELIMITER ',' CSV HEADER; | ||
\COPY ability_level FROM './data/generated/csv/ability-levels.csv' DELIMITER ',' CSV HEADER; | ||
\COPY build_sequence FROM './data/generated/csv/build-sequences.csv' DELIMITER ',' CSV HEADER; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
npm run db:drop; | ||
npm run db:create; | ||
npm run db:migrate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters