mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Split active flag removal migration into two migrations
Re #1344 https://docs.djangoproject.com/en/1.8/ref/migration-operations/#runpython
This commit is contained in:
16
awx/main/migrations/0006_v300_active_flag_cleanup.py
Normal file
16
awx/main/migrations/0006_v300_active_flag_cleanup.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from awx.main.migrations import _cleanup_deleted as cleanup_deleted
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('main', '0005_v300_migrate_facts'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(cleanup_deleted.cleanup_deleted),
|
||||||
|
]
|
||||||
@@ -1,19 +1,16 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from awx.main.migrations import _cleanup_deleted as cleanup_deleted
|
|
||||||
from django.db import migrations
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('main', '0005_v300_migrate_facts'),
|
('main', '0006_v300_active_flag_cleanup'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.RunPython(cleanup_deleted.cleanup_deleted),
|
|
||||||
|
|
||||||
migrations.RemoveField(
|
migrations.RemoveField(
|
||||||
model_name='credential',
|
model_name='credential',
|
||||||
name='active',
|
name='active',
|
||||||
@@ -14,7 +14,7 @@ class Migration(migrations.Migration):
|
|||||||
('taggit', '0002_auto_20150616_2121'),
|
('taggit', '0002_auto_20150616_2121'),
|
||||||
('contenttypes', '0002_remove_content_type_name'),
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
('main', '0006_v300_active_flag_removal'),
|
('main', '0007_v300_active_flag_removal'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
@@ -8,7 +8,7 @@ from django.db import migrations
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('main', '0007_v300_rbac_changes'),
|
('main', '0008_v300_rbac_changes'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
@@ -107,7 +107,7 @@ def create_system_job_templates(apps, schema_editor):
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('main', '0008_v300_rbac_migrations'),
|
('main', '0009_v300_rbac_migrations'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
@@ -7,7 +7,7 @@ from django.db import migrations, models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('main', '0009_v300_create_system_job_templates'),
|
('main', '0010_v300_create_system_job_templates'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
@@ -12,7 +12,7 @@ class Migration(migrations.Migration):
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
('taggit', '0002_auto_20150616_2121'),
|
('taggit', '0002_auto_20150616_2121'),
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
('main', '0010_v300_credential_domain_field'),
|
('main', '0011_v300_credential_domain_field'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
Reference in New Issue
Block a user