Commit Graph

8 Commits

Author SHA1 Message Date
a677325c4d Prevent overwriting of base game cells is_base_game value
This fixes a bug that was causing cell data to not get written since
November 9th, 2023. When batch inserting cells while processing plugins,
I allowed overwriting cells that had `is_base_game = true`. Since I
always set `is_base_game = false` for cell upserts from plugins, this
was causing the base game cells to revert to `is_base_game = false`. All
it took was one mod to bundle `Skyrim.esm` for this to happen.

This broke writing cell data since `get_cell_data` depends on the
`is_base_game` value to find edits to the Skyrim base game cells.

To prevent this in the future, batch inserts when processing plugins is
no longer allowed to update cells which have `is_base_game = true`. The
only time we allow upserting these rows is when running the
`is_base_game` backfill which initially seeds the database with the base
game cells.
2025-03-02 14:15:05 -05:00
e85edff30a Fix bad interior cell data in db
I had a bad unique index on the `cells` table. This commit does not fix
it but has two backfill scripts that will allow me to fixup the data
before creating the new unique index.

`is_base_game` identifies cells that are from the `Skyrim.esm` shipped
with the game (and not from some mod that happens to also have a
`Skyrim.esm` with a 0,0 cell with a different form id, see:
https://github.com/thallada/modmapper-web/issues/8).

`dump_cell_data` now only dumps cells from `is_base_game` cells.

`deduplicate_interior_cells` removes duplicate cell and plugin_cell rows
caused by the buggy index.

I will need to upgrade the database and create a new index in a later
commit.
2023-11-08 01:10:49 -05:00
589b00923e Replace trailing period in folder names when saving plugin file
NTFS apparently does not like that and it breaks.
2022-09-27 12:18:25 -04:00
7d229ccd1a Add support for scraping classic Skyrim mods
Not adding it to the update.sh script quite yet since I need to run the very long process of downloading every classic skyrim mod that currently exists on the nexus first.
2022-09-02 00:43:53 -04:00
17facae842 Make ancestor cols not nullable, add fk constraints
Also removed the temporary backfill, now that it is complete.

Updates models so cols are not optional.
2022-01-24 21:41:45 -05:00
e5936683fa Add ancestor id columns to plugins and plugin_cells
With temp backfill queries. Second stage will to make the columns nullable and add foreign keys.

I'm hoping that this will improve query performance.
2022-01-24 21:14:59 -05:00
Tyler Hallada
ba6ca0c928 Fix clippy lints, add 7z fallback for failed unrar 2021-08-14 11:43:09 -06:00
b2d17f6217 Refactor main.rs a bit, some fixes to 7zip fallback
Also adds reqwest timeouts
2021-08-07 00:53:56 -04:00