Organize migrations to avoid issues with…
…migrations already applied from master.
This commit is contained in:
parent
2c76bea1e6
commit
097ee44131
4 changed files with 56 additions and 28 deletions
|
@ -20,31 +20,5 @@ class Migration(migrations.Migration):
|
||||||
('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
|
('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
|
||||||
('token', models.CharField(unique=True, max_length=50)),
|
('token', models.CharField(unique=True, max_length=50)),
|
||||||
],
|
],
|
||||||
options={
|
|
||||||
'default_permissions': (),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='Group',
|
|
||||||
fields=[
|
|
||||||
('group_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, auto_created=True, to='auth.Group')),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'default_permissions': ('view', 'add', 'change'),
|
|
||||||
'verbose_name': 'Groupe',
|
|
||||||
'verbose_name_plural': 'Groupes',
|
|
||||||
},
|
|
||||||
bases=('auth.group',),
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='Permission',
|
|
||||||
fields=[
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'verbose_name': 'Permission',
|
|
||||||
'verbose_name_plural': 'Permissions',
|
|
||||||
'proxy': True,
|
|
||||||
},
|
|
||||||
bases=('auth.permission',),
|
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
54
kfet/auth/migrations/0002_create_group_permission_models.py
Normal file
54
kfet/auth/migrations/0002_create_group_permission_models.py
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('kfetauth', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
# See also `kfetauth.0004` migration which deletes already created
|
||||||
|
# permissions, if applicable.
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='genericteamtoken',
|
||||||
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
# See also `kfetauth.0003` migration which imports existing K-Fêt
|
||||||
|
# groups.
|
||||||
|
# See also `kfetauth.0004` migration which gives the default
|
||||||
|
# permissions to `Group` objects which have the deleted
|
||||||
|
# `kfet.manage_perms` permission.
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Group',
|
||||||
|
fields=[
|
||||||
|
('group_ptr', models.OneToOneField(
|
||||||
|
parent_link=True,
|
||||||
|
serialize=False,
|
||||||
|
primary_key=True,
|
||||||
|
auto_created=True,
|
||||||
|
to='auth.Group',
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'default_permissions': ('view', 'add', 'change'),
|
||||||
|
'verbose_name': 'Groupe',
|
||||||
|
'verbose_name_plural': 'Groupes',
|
||||||
|
},
|
||||||
|
bases=('auth.group',),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Permission',
|
||||||
|
fields=[
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Permission',
|
||||||
|
'verbose_name_plural': 'Permissions',
|
||||||
|
'proxy': True,
|
||||||
|
},
|
||||||
|
bases=('auth.permission',),
|
||||||
|
),
|
||||||
|
]
|
|
@ -22,7 +22,7 @@ class Migration(migrations.Migration):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('kfetauth', '0001_initial'),
|
('kfetauth', '0002_create_group_permission_models'),
|
||||||
('auth', '0006_require_contenttypes_0002'),
|
('auth', '0006_require_contenttypes_0002'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -70,7 +70,7 @@ class Migration(migrations.Migration):
|
||||||
Data migration about permissions.
|
Data migration about permissions.
|
||||||
"""
|
"""
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('kfetauth', '0002_existing_groups'),
|
('kfetauth', '0003_existing_groups'),
|
||||||
('auth', '0006_require_contenttypes_0002'),
|
('auth', '0006_require_contenttypes_0002'),
|
||||||
('contenttypes', '0002_remove_content_type_name'),
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
]
|
]
|
Loading…
Reference in a new issue