Issue #972 ยป do-not-recreate-indexes-by-default.patch

jluza, 05/11/2015 02:30 PM

View differences:

parser.add_option('--dry-run', action='store_true', dest='dry_run', default=False,
help=_('Perform a dry run with no changes made. Returns 1 if there are '
'migrations to apply.'))
parser.add_option('--load-content-types', action='store_true', dest='load_content_types',
default=False, help=_('Load content types. WARNING: THIS WILL CAUSE INDEXES TO BE REBUILT'))
options, args = parser.parse_args()
if args:
parser.error(_('Unknown arguments: %s') % ', '.join(args))
message = _('Loading content types.')
# Note that if dry_run is False, None is always returned
old_content_types = load_content_types(dry_run=options.dry_run)
old_contnet_types = None
if options.load_content_types:
old_content_types = load_content_types(dry_run=options.dry_run)
if old_content_types:
for content_type in old_content_types:
message = _(