Skip to content

Commit

Permalink
perf: migration to Sqlite3 (#513)
Browse files Browse the repository at this point in the history
* chore: put information into database (WIP)

document database vs relational database

* chore: put information into database (WIP)

document database vs relational database

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: drop /games sorting features

Wasn't used at the end since we remove it from frontend long time ago

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

* chore: put information into database (WIP)

Bug in serie through

* chore: put information into database (WIP)

* chore: remove null values

* chore: use information from database (WIP)

* chore: use information from database (WIP)

* chore: use information from database (WIP)

* chore: use information from database (WIP)

* chore: use information from database (WIP)

* chore: use information from database (WIP)

* chore: use information from database (WIP)

* chore: use information from database (WIP)

* chore: use information from database (WIP)

* chore: bug fixes

Hercule playlistId was empty string, not NULL / series_as_json was using the wrong table

* chore: use information from database (WIP)

* chore: bug fixes

* chore: bug fixes

* ci: script to automate job

* chore: npm outdated
  • Loading branch information
jy95 authored Aug 13, 2024
1 parent 5dbe02b commit 99c7f19
Show file tree
Hide file tree
Showing 47 changed files with 5,234 additions and 4,144 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/refreshJSONFiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Refresh API JSON files

on:
schedule:
# Each day at 5:00PM
- cron: '0 17 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
updater:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4
- name: Setup Node.js ✨
uses: actions/[email protected]
with:
node-version: "lts/*"
- name: 💻 Install npm packages
run: npm install better-sqlite3 --no-save
- name: 🤖 Do the thing
run: npm run generate-api-json-files
- name: 💅 Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: "[auto-updater] Updated JSON files"
body: |
This is an automated update of JSON files based on the latest data in the database.
Updated files:
- backlog.json
- games.json
- series.json
- tests.json
- platforms.json
- genres.json
- planning.json
- stats.json
draft: false
41 changes: 0 additions & 41 deletions .vscode/schemas/backlog.json

This file was deleted.

100 changes: 0 additions & 100 deletions .vscode/schemas/games.json

This file was deleted.

30 changes: 0 additions & 30 deletions .vscode/schemas/series.json

This file was deleted.

67 changes: 0 additions & 67 deletions .vscode/schemas/tests.json

This file was deleted.

26 changes: 0 additions & 26 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
{
"json.schemas": [
{
"fileMatch": [
"**/backlog.json"
],
"url": "./.vscode/schemas/backlog.json"
},
{
"fileMatch": [
"**/games.json"
],
"url": "./.vscode/schemas/games.json"
},
{
"fileMatch": [
"**/series.json"
],
"url": "./.vscode/schemas/series.json"
},
{
"fileMatch": [
"**/tests.json"
],
"url": "./.vscode/schemas/tests.json"
},
],
"i18n-ally.localesPaths": [
"messages"
]
Expand Down
Binary file added GamesPassionFR.db
Binary file not shown.
1 change: 1 addition & 0 deletions GamesPassionFR.sqbpro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><sqlb_project><db path="GamesPassionFR.db" readonly="0" foreign_keys="1" case_sensitive_like="0" temp_store="0" wal_autocheckpoint="1000" synchronous="2"/><attached/><window><main_tabs open="structure browser pragmas query" current="0"/></window><tab_structure><column_width id="0" width="300"/><column_width id="1" width="0"/><column_width id="2" width="100"/><column_width id="3" width="2450"/><column_width id="4" width="0"/><expanded_item id="0" parent="1"/><expanded_item id="1" parent="1"/><expanded_item id="2" parent="1"/><expanded_item id="3" parent="1"/></tab_structure><tab_browse><table title="games" custom_title="0" dock_id="2" table="4,5:maingames"/><table title="series_as_json" custom_title="0" dock_id="1" table="4,14:mainseries_as_json"/><dock_state state="000000ff00000000fd00000001000000020000043c000002b6fc0100000001fc000000000000043c0000012a00fffffffa000000000100000002fb000000160064006f0063006b00420072006f00770073006500310100000000ffffffff0000011e00fffffffb000000160064006f0063006b00420072006f00770073006500320100000000ffffffff0000012a00ffffff0000043c0000000000000004000000040000000800000008fc00000000"/><default_encoding codec=""/><browse_table_settings><table schema="main" name="backlog" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="31"/><column index="2" value="300"/><column index="3" value="58"/><column index="4" value="257"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort><column index="0" mode="0"/></sort><column_widths><column index="1" value="31"/><column index="2" value="93"/><column index="3" value="273"/><column index="4" value="300"/><column index="5" value="85"/><column index="6" value="70"/><column index="7" value="58"/><column index="8" value="70"/><column index="9" value="41"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_available_time" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="40"/><column index="2" value="53"/><column index="3" value="53"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_genres" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="41"/><column index="2" value="42"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_genres_agg" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="39"/><column index="2" value="93"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_schedules" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort><column index="1" mode="0"/></sort><column_widths><column index="1" value="163"/><column index="2" value="331"/><column index="3" value="274"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="genres" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="29"/><column index="2" value="93"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="platforms" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="29"/><column index="2" value="39"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="series" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="29"/><column index="2" value="156"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="series_as_json" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="156"/><column index="2" value="300"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="series_games" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="37"/><column index="2" value="41"/><column index="3" value="38"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="sqlite_sequence" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="146"/><column index="2" value="196"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table></browse_table_settings></tab_browse><tab_sql><sql name="SQL 1"></sql><current_tab id="0"/></tab_sql></sqlb_project>
Loading

0 comments on commit 99c7f19

Please sign in to comment.