signum-network / signum-explorer

Signum Blockchain Explorer
GNU General Public License v3.0
9 stars 11 forks source link

Explorer Migrate and makemigrations were broken #143

Closed pir8radio closed 1 year ago

pir8radio commented 1 year ago

due to new fields recently added, models.py needed to be updated (manually vs auto generate, I didn't want to break anything). allowed blank and null in model fields so makemigrations would run, tested migrate, works.

gittrekt commented 1 year ago

Instead of manually changing the models manually I would recommend using the built in functions.

python manage.py inspectdb --database java_wallet > models.py

You can an example of the latest in my repo. One point to mention is there is a spelling mistake in the explorer queries that uses indirec instead in indirects and will need to be fixed to be able to load indirects after doing so.

pir8radio commented 1 year ago

Instead of manually changing the models manually I would recommend using the built in functions.

python manage.py inspectdb --database java_wallet > models.py

You can an example of the latest in my repo. One point to mention is there is a spelling mistake in the explorer queries that uses indirec instead in indirects and will need to be fixed to be able to load indirects after doing so.

I'll look at the spelling issue.
If you use inspectdb you still need to manually edit after generation right? Order and single value models need to be manually massaged still.

gittrekt commented 1 year ago

It's gone both ways for me. As of django 4.2 I did not need to manually modify it. Previous version you need to replace the models with the custom positive 8bit math one, other I believe 16bit models are used which can cause some long addresses to be calculated incorrectly.

pir8radio commented 1 year ago

added coingecko logo so we do not violate any requirements for their API use.

frankTheTank72 commented 1 year ago

@pir8radio will you also adjust all the code lines with 'IndirecIncoming' to 'IndirectIncoming' ? Around 18 x in the code

frankTheTank72 commented 1 year ago

Okay i merge and we can check the spelling later