From 673f46593a19e0f15fe4f39b8d13f06561bf8860 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sat, 26 Mar 2016 18:29:32 +0100 Subject: [PATCH 1/2] Simplify first migration, should fix #1 --- .../0001_squashed_0021_auto_20150611_2102.py | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py b/cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py index 7d5bf54..b6ca34b 100644 --- a/cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py +++ b/cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py @@ -98,7 +98,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('username', models.CharField(max_length=30)), ('date', models.DateTimeField(auto_now=True, auto_now_add=True)), - ('session', models.OneToOneField(related_name='cas_server_user', null=True, blank=True, to='sessions.Session')), + ('session_key', models.CharField(max_length=40, null=True, blank=True)), ], options={ }, @@ -310,28 +310,8 @@ class Migration(migrations.Migration): field=models.CharField(help_text='name of an attribut to send to the service, use * for all attributes', max_length=255, verbose_name='name'), preserve_default=True, ), - migrations.AlterUniqueTogether( - name='user', - unique_together=set([('username', 'session')]), - ), - migrations.AlterField( - model_name='user', - name='session', - field=models.OneToOneField(related_name='cas_server_user', null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to='sessions.Session'), - preserve_default=True, - ), - migrations.AddField( - model_name='user', - name='session_key', - field=models.CharField(max_length=40, null=True, blank=True), - preserve_default=True, - ), migrations.AlterUniqueTogether( name='user', unique_together=set([('username', 'session_key')]), ), - migrations.RemoveField( - model_name='user', - name='session', - ), ] From 8a2e44c23cf3c54dadaa229194520dc70b5b7854 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sat, 26 Mar 2016 18:30:06 +0100 Subject: [PATCH 2/2] Normalize first migration --- cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py b/cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py index b6ca34b..a2000bc 100644 --- a/cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py +++ b/cas_server/migrations/0001_squashed_0021_auto_20150611_2102.py @@ -9,7 +9,7 @@ import picklefield.fields class Migration(migrations.Migration): - replaces = [(b'cas_server', '0001_initial'), (b'cas_server', '0002_auto_20150517_1406'), (b'cas_server', '0003_auto_20150518_1648'), (b'cas_server', '0004_auto_20150518_1659'), (b'cas_server', '0005_auto_20150518_1717'), (b'cas_server', '0006_auto_20150518_1720'), (b'cas_server', '0007_auto_20150518_1727'), (b'cas_server', '0008_servicepattern_name'), (b'cas_server', '0009_auto_20150518_1740'), (b'cas_server', '0010_auto_20150518_2139'), (b'cas_server', '0011_auto_20150523_1731'), (b'cas_server', '0012_auto_20150527_1956'), (b'cas_server', '0013_servicepattern_single_sign_out'), (b'cas_server', '0014_auto_20150528_0012'), (b'cas_server', '0015_auto_20150528_1202'), (b'cas_server', '0016_auto_20150528_1326'), (b'cas_server', '0017_remove_user_attributs'), (b'cas_server', '0018_auto_20150608_1621'), (b'cas_server', '0019_auto_20150609_1903'), (b'cas_server', '0020_auto_20150609_1917'), (b'cas_server', '0021_auto_20150611_2102')] + #replaces = [(b'cas_server', '0001_initial'), (b'cas_server', '0002_auto_20150517_1406'), (b'cas_server', '0003_auto_20150518_1648'), (b'cas_server', '0004_auto_20150518_1659'), (b'cas_server', '0005_auto_20150518_1717'), (b'cas_server', '0006_auto_20150518_1720'), (b'cas_server', '0007_auto_20150518_1727'), (b'cas_server', '0008_servicepattern_name'), (b'cas_server', '0009_auto_20150518_1740'), (b'cas_server', '0010_auto_20150518_2139'), (b'cas_server', '0011_auto_20150523_1731'), (b'cas_server', '0012_auto_20150527_1956'), (b'cas_server', '0013_servicepattern_single_sign_out'), (b'cas_server', '0014_auto_20150528_0012'), (b'cas_server', '0015_auto_20150528_1202'), (b'cas_server', '0016_auto_20150528_1326'), (b'cas_server', '0017_remove_user_attributs'), (b'cas_server', '0018_auto_20150608_1621'), (b'cas_server', '0019_auto_20150609_1903'), (b'cas_server', '0020_auto_20150609_1917'), (b'cas_server', '0021_auto_20150611_2102')] dependencies = [ ('sessions', '0001_initial'),