#10062: inspectdb could use random field to inspect table ---------------------------------------+------------------------------------ Reporter: phoebebright | Owner: nobody Status: new | Milestone: Component: django-admin.py inspectdb | Version: 1.0 Keywords: | Stage: Unreviewed Has_patch: 0 | ---------------------------------------+------------------------------------ Currently uses the first record SELECT * FROM %s LIMIT 1 If there is bad data in the first record it can fail eg. Warning: Incorrect datetime value: '11437866' for function str_to_time I know this is really a problem with the database and could potentially be confusing and slow - but how about picking a random record.
SELECT * FROM %s ORDER BY RAND() LIMIT 1 -- Ticket URL: <http://code.djangoproject.com/ticket/10062> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
