|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +from __future__ import unicode_literals |
| 3 | + |
| 4 | +from django.db import migrations, models |
| 5 | + |
| 6 | + |
| 7 | +class Migration(migrations.Migration): |
| 8 | + |
| 9 | + dependencies = [ |
| 10 | + ('name', '0019_formallanguagename'), |
| 11 | + ('doc', '0025_auto_20170307_0146'), |
| 12 | + ] |
| 13 | + |
| 14 | + operations = [ |
| 15 | + migrations.AddField( |
| 16 | + model_name='dochistory', |
| 17 | + name='words', |
| 18 | + field=models.IntegerField(null=True, blank=True), |
| 19 | + ), |
| 20 | + migrations.AddField( |
| 21 | + model_name='document', |
| 22 | + name='words', |
| 23 | + field=models.IntegerField(null=True, blank=True), |
| 24 | + ), |
| 25 | + migrations.AddField( |
| 26 | + model_name='dochistory', |
| 27 | + name='formal_languages', |
| 28 | + field=models.ManyToManyField(help_text=b'Formal languages used in document', to='name.FormalLanguageName', blank=True), |
| 29 | + ), |
| 30 | + migrations.AddField( |
| 31 | + model_name='document', |
| 32 | + name='formal_languages', |
| 33 | + field=models.ManyToManyField(help_text=b'Formal languages used in document', to='name.FormalLanguageName', blank=True), |
| 34 | + ), |
| 35 | + migrations.RemoveField( |
| 36 | + model_name='dochistory', |
| 37 | + name='authors', |
| 38 | + ), |
| 39 | + migrations.RemoveField( |
| 40 | + model_name='document', |
| 41 | + name='authors', |
| 42 | + ), |
| 43 | + migrations.AddField( |
| 44 | + model_name='dochistoryauthor', |
| 45 | + name='affiliation', |
| 46 | + field=models.CharField(help_text=b'Organization/company used by author for submission', max_length=100, blank=True), |
| 47 | + ), |
| 48 | + migrations.AddField( |
| 49 | + model_name='dochistoryauthor', |
| 50 | + name='country', |
| 51 | + field=models.CharField(blank=True, help_text=b'Country used by author for submission', max_length=255), |
| 52 | + ), |
| 53 | + migrations.RenameField( |
| 54 | + model_name='dochistoryauthor', |
| 55 | + old_name='author', |
| 56 | + new_name='email', |
| 57 | + ), |
| 58 | + migrations.AlterField( |
| 59 | + model_name='dochistoryauthor', |
| 60 | + name='email', |
| 61 | + field=models.ForeignKey(blank=True, to='person.Email', help_text=b'Email address used by author for submission', null=True), |
| 62 | + ), |
| 63 | + migrations.AddField( |
| 64 | + model_name='dochistoryauthor', |
| 65 | + name='person', |
| 66 | + field=models.ForeignKey(blank=True, to='person.Person', null=True), |
| 67 | + ), |
| 68 | + migrations.AddField( |
| 69 | + model_name='documentauthor', |
| 70 | + name='affiliation', |
| 71 | + field=models.CharField(help_text=b'Organization/company used by author for submission', max_length=100, blank=True), |
| 72 | + ), |
| 73 | + migrations.AddField( |
| 74 | + model_name='documentauthor', |
| 75 | + name='country', |
| 76 | + field=models.CharField(blank=True, help_text=b'Country used by author for submission', max_length=255), |
| 77 | + ), |
| 78 | + migrations.RenameField( |
| 79 | + model_name='documentauthor', |
| 80 | + old_name='author', |
| 81 | + new_name='email', |
| 82 | + ), |
| 83 | + migrations.AlterField( |
| 84 | + model_name='documentauthor', |
| 85 | + name='email', |
| 86 | + field=models.ForeignKey(blank=True, to='person.Email', help_text=b'Email address used by author for submission', null=True), |
| 87 | + ), |
| 88 | + migrations.AddField( |
| 89 | + model_name='documentauthor', |
| 90 | + name='person', |
| 91 | + field=models.ForeignKey(blank=True, to='person.Person', null=True), |
| 92 | + ), |
| 93 | + migrations.AlterField( |
| 94 | + model_name='dochistoryauthor', |
| 95 | + name='document', |
| 96 | + field=models.ForeignKey(related_name='documentauthor_set', to='doc.DocHistory'), |
| 97 | + ), |
| 98 | + migrations.AlterField( |
| 99 | + model_name='dochistoryauthor', |
| 100 | + name='order', |
| 101 | + field=models.IntegerField(default=1), |
| 102 | + ), |
| 103 | + 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), |
| 104 | + 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), |
| 105 | + migrations.AlterField( |
| 106 | + model_name='documentauthor', |
| 107 | + name='person', |
| 108 | + field=models.ForeignKey(to='person.Person'), |
| 109 | + ), |
| 110 | + migrations.AlterField( |
| 111 | + model_name='dochistoryauthor', |
| 112 | + name='person', |
| 113 | + field=models.ForeignKey(to='person.Person'), |
| 114 | + ), |
| 115 | + ] |
0 commit comments