-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into #45_remove_support_for_python_2
# Conflicts: # django_elastic_migrations/management/commands/es_deactivate.py
- Loading branch information
Showing
5 changed files
with
29 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
django_elastic_migrations/management/commands/es_deactivate.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
from django_elastic_migrations import DEMIndexManager | ||
from django_elastic_migrations.management.commands.es import ESCommand | ||
|
||
|
||
class Command(ESCommand): | ||
help = "django-elastic-migrations: deactivate an index" | ||
|
||
def add_arguments(self, parser): | ||
self.get_index_specifying_arguments(parser) | ||
|
||
def handle(self, *args, **options): | ||
indexes, exact_mode, apply_all, _, _ = self.get_index_specifying_options(options) | ||
|
||
if apply_all: | ||
DEMIndexManager.deactivate_index( | ||
'all', | ||
exact_mode=exact_mode, | ||
) | ||
elif indexes: | ||
for index_name in indexes: | ||
DEMIndexManager.deactivate_index( | ||
index_name, | ||
exact_mode=exact_mode, | ||
) | ||
23 changes: 23 additions & 0 deletions
23
django_elastic_migrations/migrations/0007_auto_20181112_0937.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11 on 2018-11-12 09:37 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('django_elastic_migrations', '0006_auto_20180709_2101'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='DeactivateIndexAction', | ||
), | ||
migrations.AlterField( | ||
model_name='indexaction', | ||
name='action', | ||
field=models.CharField(choices=[('create_index', 'create_index'), ('update_index', 'update_index'), ('activate_index', 'activate_index'), ('clear_index', 'clear_index'), ('drop_index', 'drop_index'), ('partial_update_index', 'partial_update_index')], max_length=64), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters