Fixed #23799 -- squashmigrations --no-optimize still optimizes

I opted to not remove it because it might become useful when the migration optimizer breaks for some reason.
could we make it a class attribute instead?