TACC / Core-CMS

The Core CMS codebase used by TACC Portals.
https://cep.tacc.utexas.edu
2 stars 1 forks source link

test: use AutoField instead of BigAutoField to avoid migrations #789

Closed wesleyboar closed 7 months ago

wesleyboar commented 7 months ago

Overview

Avoid migrations by using AutoField instead of BigAutoField.

Background.

Related

Changes

Testing

  1. check out main branch
  2. build new image
  3. start new image
  4. in Docker, … makemigrations
  5. save output
  6. check out new branch
    • Core-CMS deps/python-3.11
    • TUP-UI:chore/collectstatic-on-build
  7. build new image
  8. start new image
  9. in Docker, … makemigrations
  10. save output
  11. compare output

UI Results

Core TUP
before Core.main.-.makemigrations.log TUP.main.-.makemigrations.log
BigAutoField Core.python-3.11.-BigAutoField-.makemigrations.log TUP.collectstatic-on-build.-BigAutoField-.makemigrations.log
AutoField Core.python-3.11.-AutoField-.makemigrations.log TUP.collectstatic-on-build.-AutoField-.makemigrations.log
wesleyboar commented 7 months ago

I retract my request and bury my concern.

@wesleyboar, this is why you can let this go:

  • The migrations for third-party apps are local/transient. They won't be run again.
  • The end result is still BigAutoField. Trust that Django is smart enough to see that.
  • If conflicts occur, there is a … makemigrations --merge <app> that might help.

https://github.com/TACC/Core-CMS/pull/787#discussion_r1457878445

wesleyboar commented 7 months ago

I am still concerned. Especially given Chat GPT's answer to my question that validates my concern. But, it's Chat GPT answering a complex question, so I shouldn't put much faith in it.