|
2 | 2 | from __future__ import unicode_literals |
3 | 3 |
|
4 | 4 | from django.db import migrations, models |
| 5 | +import django_countries.fields |
5 | 6 |
|
6 | 7 |
|
7 | 8 | class Migration(migrations.Migration): |
@@ -32,4 +33,84 @@ class Migration(migrations.Migration): |
32 | 33 | name='formal_languages', |
33 | 34 | field=models.ManyToManyField(help_text=b'Formal languages used in document', to='name.FormalLanguageName', blank=True), |
34 | 35 | ), |
| 36 | + migrations.RemoveField( |
| 37 | + model_name='dochistory', |
| 38 | + name='authors', |
| 39 | + ), |
| 40 | + migrations.RemoveField( |
| 41 | + model_name='document', |
| 42 | + name='authors', |
| 43 | + ), |
| 44 | + migrations.AddField( |
| 45 | + model_name='dochistoryauthor', |
| 46 | + name='affiliation', |
| 47 | + field=models.CharField(help_text=b'Organization/company used by author for submission', max_length=100, blank=True), |
| 48 | + ), |
| 49 | + migrations.AddField( |
| 50 | + model_name='dochistoryauthor', |
| 51 | + name='country', |
| 52 | + field=django_countries.fields.CountryField(blank=True, help_text=b'Country used by author for submission', max_length=2), |
| 53 | + ), |
| 54 | + migrations.RenameField( |
| 55 | + model_name='dochistoryauthor', |
| 56 | + old_name='author', |
| 57 | + new_name='email', |
| 58 | + ), |
| 59 | + migrations.AlterField( |
| 60 | + model_name='dochistoryauthor', |
| 61 | + name='email', |
| 62 | + field=models.ForeignKey(blank=True, to='person.Email', help_text=b'Email address used by author for submission', null=True), |
| 63 | + ), |
| 64 | + migrations.AddField( |
| 65 | + model_name='dochistoryauthor', |
| 66 | + name='person', |
| 67 | + field=models.ForeignKey(blank=True, to='person.Person', null=True), |
| 68 | + ), |
| 69 | + migrations.AddField( |
| 70 | + model_name='documentauthor', |
| 71 | + name='affiliation', |
| 72 | + field=models.CharField(help_text=b'Organization/company used by author for submission', max_length=100, blank=True), |
| 73 | + ), |
| 74 | + migrations.AddField( |
| 75 | + model_name='documentauthor', |
| 76 | + name='country', |
| 77 | + field=django_countries.fields.CountryField(blank=True, help_text=b'Country used by author for submission', max_length=2), |
| 78 | + ), |
| 79 | + migrations.RenameField( |
| 80 | + model_name='documentauthor', |
| 81 | + old_name='author', |
| 82 | + new_name='email', |
| 83 | + ), |
| 84 | + migrations.AlterField( |
| 85 | + model_name='documentauthor', |
| 86 | + name='email', |
| 87 | + field=models.ForeignKey(blank=True, to='person.Email', help_text=b'Email address used by author for submission', null=True), |
| 88 | + ), |
| 89 | + migrations.AddField( |
| 90 | + model_name='documentauthor', |
| 91 | + name='person', |
| 92 | + field=models.ForeignKey(blank=True, to='person.Person', null=True), |
| 93 | + ), |
| 94 | + migrations.AlterField( |
| 95 | + model_name='dochistoryauthor', |
| 96 | + name='document', |
| 97 | + field=models.ForeignKey(related_name='documentauthor_set', to='doc.DocHistory'), |
| 98 | + ), |
| 99 | + migrations.AlterField( |
| 100 | + model_name='dochistoryauthor', |
| 101 | + name='order', |
| 102 | + field=models.IntegerField(default=1), |
| 103 | + ), |
| 104 | + migrations.RunSQL("update doc_documentauthor a inner join person_email e on a.email_id = e.address set a.person_id = e.person_id;", migrations.RunSQL.noop), |
| 105 | + migrations.RunSQL("update doc_dochistoryauthor a inner join person_email e on a.email_id = e.address set a.person_id = e.person_id;", migrations.RunSQL.noop), |
| 106 | + migrations.AlterField( |
| 107 | + model_name='documentauthor', |
| 108 | + name='person', |
| 109 | + field=models.ForeignKey(to='person.Person'), |
| 110 | + ), |
| 111 | + migrations.AlterField( |
| 112 | + model_name='dochistoryauthor', |
| 113 | + name='person', |
| 114 | + field=models.ForeignKey(to='person.Person'), |
| 115 | + ), |
35 | 116 | ] |
0 commit comments