AkeemAllen / WikiGen

Desktop Application to generate wikis for Pokemon Rom Hacks
5 stars 1 forks source link

Explore switching to database for storage #65

Closed AkeemAllen closed 1 week ago

AkeemAllen commented 3 weeks ago

WikiGen currently uses raw JSON to store data. I've begun hitting several limitations of what's possible with this storage method. For example, I had to "shard" pokemon data among 10 files to prevent long save times. This is because I can't make granular/targeted updates to pokemon data without rewriting the entire json file.

If I'm giving users the ability to create fakemon, having this 10 "shard" structure isn't as ideal as using a traditional database.

This ticket is meant to explore what it would take transition to a database

AkeemAllen commented 3 weeks ago

Preliminary database structure

Item

Nature

Ability

AkeemAllen commented 3 weeks ago

Findings

Will need to load in sqlite db file upon wiki's first creation. Can I create sqlite db's per wiki?

To create a db file per wiki, I may need to run initial migrations on a main.db file and then copy the file per wiki on wiki change load database.

AkeemAllen commented 3 weeks ago

intial plan of attack

AkeemAllen commented 2 weeks ago

Instead of automatically marking an entry as modified or new, allow the creator to do this