From c0996a7d198307a29fac5fa949d729691f7bab19 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 18 Oct 2016 00:47:53 +0200 Subject: [PATCH] =?UTF-8?q?R=C3=A9=C3=A9crit=20les=20migrations=20dans=20l?= =?UTF-8?q?e=20bon=20ordre=20pour=20ne=20pas=20planter=20sur=20les=20contr?= =?UTF-8?q?aintes=20de=20l'id=20rezo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/migrations/0034_auto_20161018_0037.py | 37 +++++++++++++++++++ users/migrations/0034_user_uid_number.py | 20 ---------- ...731_0448.py => 0035_auto_20161018_0046.py} | 4 +- users/migrations/0036_auto_20160731_0448.py | 20 ---------- users/migrations/0037_ldapuser_login_shell.py | 20 ---------- users/migrations/0038_auto_20161006_1952.py | 20 ---------- users/migrations/0038_user_rezo_rez_uid.py | 19 ---------- users/migrations/0039_merge.py | 15 -------- 8 files changed, 39 insertions(+), 116 deletions(-) create mode 100644 users/migrations/0034_auto_20161018_0037.py delete mode 100644 users/migrations/0034_user_uid_number.py rename users/migrations/{0035_auto_20160731_0448.py => 0035_auto_20161018_0046.py} (70%) delete mode 100644 users/migrations/0036_auto_20160731_0448.py delete mode 100644 users/migrations/0037_ldapuser_login_shell.py delete mode 100644 users/migrations/0038_auto_20161006_1952.py delete mode 100644 users/migrations/0038_user_rezo_rez_uid.py delete mode 100644 users/migrations/0039_merge.py diff --git a/users/migrations/0034_auto_20161018_0037.py b/users/migrations/0034_auto_20161018_0037.py new file mode 100644 index 00000000..71587ce0 --- /dev/null +++ b/users/migrations/0034_auto_20161018_0037.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import ldapdb.models.fields +import django.db.models.deletion +import users.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0033_remove_ldapuser_loginshell'), + ] + + operations = [ + migrations.AddField( + model_name='ldapuser', + name='login_shell', + field=ldapdb.models.fields.CharField(blank=True, db_column='loginShell', max_length=200, null=True), + ), + migrations.AddField( + model_name='user', + name='rezo_rez_uid', + field=models.IntegerField(blank=True, unique=True, null=True), + ), + migrations.AddField( + model_name='user', + name='uid_number', + field=models.IntegerField(unique=True), + ), + migrations.AlterField( + model_name='user', + name='school', + field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, to='users.School', null=True), + ), + ] diff --git a/users/migrations/0034_user_uid_number.py b/users/migrations/0034_user_uid_number.py deleted file mode 100644 index 1761ab61..00000000 --- a/users/migrations/0034_user_uid_number.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0033_remove_ldapuser_loginshell'), - ] - - operations = [ - migrations.AddField( - model_name='user', - name='uid_number', - field=models.IntegerField(default=1), - preserve_default=False, - ), - ] diff --git a/users/migrations/0035_auto_20160731_0448.py b/users/migrations/0035_auto_20161018_0046.py similarity index 70% rename from users/migrations/0035_auto_20160731_0448.py rename to users/migrations/0035_auto_20161018_0046.py index eccea8ea..3fbeee66 100644 --- a/users/migrations/0035_auto_20160731_0448.py +++ b/users/migrations/0035_auto_20161018_0046.py @@ -8,13 +8,13 @@ import users.models class Migration(migrations.Migration): dependencies = [ - ('users', '0034_user_uid_number'), + ('users', '0034_auto_20161018_0037'), ] operations = [ migrations.AlterField( model_name='user', name='uid_number', - field=models.IntegerField(default=users.models.User.auto_uid), + field=models.IntegerField(unique=True, default=users.models.User.auto_uid), ), ] diff --git a/users/migrations/0036_auto_20160731_0448.py b/users/migrations/0036_auto_20160731_0448.py deleted file mode 100644 index ade24828..00000000 --- a/users/migrations/0036_auto_20160731_0448.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models -import users.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0035_auto_20160731_0448'), - ] - - operations = [ - migrations.AlterField( - model_name='user', - name='uid_number', - field=models.IntegerField(default=users.models.User.auto_uid, unique=True), - ), - ] diff --git a/users/migrations/0037_ldapuser_login_shell.py b/users/migrations/0037_ldapuser_login_shell.py deleted file mode 100644 index d412fa5c..00000000 --- a/users/migrations/0037_ldapuser_login_shell.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models -import ldapdb.models.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0036_auto_20160731_0448'), - ] - - operations = [ - migrations.AddField( - model_name='ldapuser', - name='login_shell', - field=ldapdb.models.fields.CharField(null=True, db_column='loginShell', blank=True, max_length=200), - ), - ] diff --git a/users/migrations/0038_auto_20161006_1952.py b/users/migrations/0038_auto_20161006_1952.py deleted file mode 100644 index af286a25..00000000 --- a/users/migrations/0038_auto_20161006_1952.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0037_ldapuser_login_shell'), - ] - - operations = [ - migrations.AlterField( - model_name='user', - name='school', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='users.School'), - ), - ] diff --git a/users/migrations/0038_user_rezo_rez_uid.py b/users/migrations/0038_user_rezo_rez_uid.py deleted file mode 100644 index 6665aae6..00000000 --- a/users/migrations/0038_user_rezo_rez_uid.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0037_ldapuser_login_shell'), - ] - - operations = [ - migrations.AddField( - model_name='user', - name='rezo_rez_uid', - field=models.IntegerField(null=True, blank=True, unique=True), - ), - ] diff --git a/users/migrations/0039_merge.py b/users/migrations/0039_merge.py deleted file mode 100644 index 9f534227..00000000 --- a/users/migrations/0039_merge.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0038_user_rezo_rez_uid'), - ('users', '0038_auto_20161006_1952'), - ] - - operations = [ - ]