﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15985	manage.py syncdb without loading initial data	michaeljean	nobody	"I needed a way to rebuild the database structure without loading the initial data in order to make a custom subset of data. Basically what was needed was the same functionality as 'manage.py syncdb' except for the last step to load the initial data.

To do this, the django file django\core\management\syncdb.py was examined and it was observed that omitting the loading of initial data required minimal changes to the existing file.
The file django\core\management\commands\syncdb.py was copied and renamed django\core\management\commands\initializedb.py. Then the last 2 lines were deleted to disable the loading of the intial data:

from django.core.management import call_command
call_command('loaddata', 'initial_data', verbosity=verbosity, database=db)

The new file initialize.py enables the use of the command 'manage.py initializedb' using the same command line options as syncdb.

Example usage:
[root@oasdev os_so]# python manage.py initializedb --database='oas_datamart_test_data'

Handy for some things, violates DRY, but it works and I am am willing to contribute it."	New feature	closed	Core (Management commands)	1.3	Normal	duplicate			Unreviewed	0	0	0	0	0	0
