mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #1289 -- Improved 'inspectdb' to introspect decimal_places and max_digits for FloatFields. Thanks, gandalf@owca.info
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -633,6 +633,10 @@ def inspectdb(db_name): | ||||
|                 if field_type == 'CharField' and row[3]: | ||||
|                     extra_params['maxlength'] = row[3] | ||||
|  | ||||
|                 if field_type == 'FloatField': | ||||
|                     extra_params['max_digits'] = row[4] | ||||
|                     extra_params['decimal_places'] = row[5] | ||||
|  | ||||
|                 # Add primary_key and unique, if necessary. | ||||
|                 column_name = extra_params.get('db_column', att_name) | ||||
|                 if column_name in indexes: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user