# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.db import models, migrations import re import django.contrib.gis.db.models.fields import ishtar_common.models import django.contrib.auth.models import django.db.models.deletion from django.conf import settings import django.core.validators class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), # ('auth', 'ishtar_profile'), ] operations = [ migrations.CreateModel( name='Arrondissement', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=30, verbose_name='Nom')), ], ), migrations.CreateModel( name='Author', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ], options={ 'ordering': ('author_type__order', 'person__name'), 'verbose_name': 'Author', 'verbose_name_plural': 'Authors', 'permissions': (('view_author', 'Can view all Authors'), ('view_own_author', 'Can view own Author'), ('add_own_author', 'Can add own Author'), ('change_own_author', 'Can change own Author'), ('delete_own_author', 'Can delete own Author')), }, ), migrations.CreateModel( name='AuthorType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ('order', models.IntegerField(default=1, verbose_name='Order')), ], options={ 'ordering': ['order', 'label'], 'verbose_name': 'Author type', 'verbose_name_plural': 'Author types', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='Canton', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=30, verbose_name='Nom')), ('arrondissement', models.ForeignKey(verbose_name='Arrondissement', to='ishtar_common.Arrondissement')), ], ), migrations.CreateModel( name='Department', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=30, verbose_name='Label')), ('number', models.CharField(unique=True, max_length=3, verbose_name='Number')), ], options={ 'ordering': ['number'], 'verbose_name': 'Department', 'verbose_name_plural': 'Departments', }, ), migrations.CreateModel( name='DocumentTemplate', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=100, verbose_name='Name')), ('template', models.FileField(upload_to=b'upload/templates/', verbose_name='Template')), ('associated_object_name', models.CharField(max_length=100, verbose_name='Associated object', choices=[(b'archaeological_operations.models.AdministrativeAct', 'Administrative Act')])), ('available', models.BooleanField(default=True, verbose_name='Available')), ], options={ 'ordering': ['associated_object_name', 'name'], 'verbose_name': 'Document template', 'verbose_name_plural': 'Document templates', }, ), migrations.CreateModel( name='Format', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ], options={ 'ordering': ['label'], 'verbose_name': 'Format type', 'verbose_name_plural': 'Format types', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='FormaterType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('formater_type', models.CharField(max_length=20, verbose_name='Formater type', choices=[(b'IntegerFormater', 'Integer'), (b'FloatFormater', 'Float'), (b'UnicodeFormater', 'String'), (b'DateFormater', 'Date'), (b'TypeFormater', 'Type'), (b'YearFormater', 'Year'), (b'StrToBoolean', 'String to boolean'), (b'FileFormater', 'File'), (b'UnknowType', 'Unknow type')])), ('options', models.CharField(max_length=500, null=True, verbose_name='Options', blank=True)), ('many_split', models.CharField(max_length=10, null=True, verbose_name='Split character(s)', blank=True)), ], options={ 'ordering': ('formater_type', 'options'), 'verbose_name': 'Importer - Formater type', 'verbose_name_plural': 'Importer - Formater types', }, ), migrations.CreateModel( name='GlobalVar', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('slug', models.SlugField(unique=True, verbose_name='Variable name')), ('description', models.TextField(null=True, verbose_name='Description of the variable', blank=True)), ('value', models.TextField(null=True, verbose_name='Value', blank=True)), ], options={ 'ordering': ['slug'], 'verbose_name': 'Global variable', 'verbose_name_plural': 'Global variables', }, bases=(models.Model, ishtar_common.models.Cached), ), migrations.CreateModel( name='HistoricalOrganization', fields=[ ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), ('address', models.TextField(null=True, verbose_name='Address', blank=True)), ('address_complement', models.TextField(null=True, verbose_name='Address complement', blank=True)), ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Postal code', blank=True)), ('town', models.CharField(max_length=70, null=True, verbose_name='Town', blank=True)), ('country', models.CharField(max_length=30, null=True, verbose_name='Country', blank=True)), ('alt_address', models.TextField(null=True, verbose_name='Other address: address', blank=True)), ('alt_address_complement', models.TextField(null=True, verbose_name='Other address: address complement', blank=True)), ('alt_postal_code', models.CharField(max_length=10, null=True, verbose_name='Other address: postal code', blank=True)), ('alt_town', models.CharField(max_length=70, null=True, verbose_name='Other address: town', blank=True)), ('alt_country', models.CharField(max_length=30, null=True, verbose_name='Other address: country', blank=True)), ('phone', models.CharField(max_length=18, null=True, verbose_name='Phone', blank=True)), ('phone_desc', models.CharField(max_length=300, null=True, verbose_name='Phone description', blank=True)), ('phone2', models.CharField(max_length=18, null=True, verbose_name='Phone description 2', blank=True)), ('phone_desc2', models.CharField(max_length=300, null=True, verbose_name='Phone description 2', blank=True)), ('phone3', models.CharField(max_length=18, null=True, verbose_name='Phone 3', blank=True)), ('phone_desc3', models.CharField(max_length=300, null=True, verbose_name='Phone description 3', blank=True)), ('raw_phone', models.TextField(null=True, verbose_name='Raw phone', blank=True)), ('mobile_phone', models.CharField(max_length=18, null=True, verbose_name='Mobile phone', blank=True)), ('email', models.EmailField(max_length=300, null=True, verbose_name='Email', blank=True)), ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), ('merge_key', models.TextField(null=True, verbose_name='Merge key', blank=True)), ('archived', models.NullBooleanField(default=False)), ('name', models.CharField(max_length=500, verbose_name='Name')), ('history_id', models.AutoField(serialize=False, primary_key=True)), ('history_date', models.DateTimeField()), ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), ], options={ 'ordering': ('-history_date', '-history_id'), 'get_latest_by': 'history_date', 'verbose_name': 'historical Organization', }, ), migrations.CreateModel( name='HistoricalPerson', fields=[ ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), ('address', models.TextField(null=True, verbose_name='Address', blank=True)), ('address_complement', models.TextField(null=True, verbose_name='Address complement', blank=True)), ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Postal code', blank=True)), ('town', models.CharField(max_length=70, null=True, verbose_name='Town', blank=True)), ('country', models.CharField(max_length=30, null=True, verbose_name='Country', blank=True)), ('alt_address', models.TextField(null=True, verbose_name='Other address: address', blank=True)), ('alt_address_complement', models.TextField(null=True, verbose_name='Other address: address complement', blank=True)), ('alt_postal_code', models.CharField(max_length=10, null=True, verbose_name='Other address: postal code', blank=True)), ('alt_town', models.CharField(max_length=70, null=True, verbose_name='Other address: town', blank=True)), ('alt_country', models.CharField(max_length=30, null=True, verbose_name='Other address: country', blank=True)), ('phone', models.CharField(max_length=18, null=True, verbose_name='Phone', blank=True)), ('phone_desc', models.CharField(max_length=300, null=True, verbose_name='Phone description', blank=True)), ('phone2', models.CharField(max_length=18, null=True, verbose_name='Phone description 2', blank=True)), ('phone_desc2', models.CharField(max_length=300, null=True, verbose_name='Phone description 2', blank=True)), ('phone3', models.CharField(max_length=18, null=True, verbose_name='Phone 3', blank=True)), ('phone_desc3', models.CharField(max_length=300, null=True, verbose_name='Phone description 3', blank=True)), ('raw_phone', models.TextField(null=True, verbose_name='Raw phone', blank=True)), ('mobile_phone', models.CharField(max_length=18, null=True, verbose_name='Mobile phone', blank=True)), ('email', models.EmailField(max_length=300, null=True, verbose_name='Email', blank=True)), ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), ('merge_key', models.TextField(null=True, verbose_name='Merge key', blank=True)), ('archived', models.NullBooleanField(default=False)), ('old_title', models.CharField(blank=True, max_length=100, null=True, verbose_name='Title', choices=[(b'Mr', 'Mr'), (b'Ms', 'Miss'), (b'Mr and Miss', 'Mr and Mrs'), (b'Md', 'Mrs'), (b'Dr', 'Doctor')])), ('salutation', models.CharField(max_length=200, null=True, verbose_name='Salutation', blank=True)), ('surname', models.CharField(max_length=50, null=True, verbose_name='Surname', blank=True)), ('name', models.CharField(max_length=200, null=True, verbose_name='Name', blank=True)), ('raw_name', models.CharField(max_length=300, null=True, verbose_name='Raw name', blank=True)), ('contact_type', models.CharField(max_length=300, null=True, verbose_name='Contact type', blank=True)), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('history_id', models.AutoField(serialize=False, primary_key=True)), ('history_date', models.DateTimeField()), ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), ], options={ 'ordering': ('-history_date', '-history_id'), 'get_latest_by': 'history_date', 'verbose_name': 'historical Person', }, ), migrations.CreateModel( name='Import', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=500, null=True, verbose_name='Name', blank=True)), ('imported_file', models.FileField(upload_to=b'upload/imports/', max_length=220, verbose_name='Imported file')), ('imported_images', models.FileField(max_length=220, upload_to=b'upload/imports/', null=True, verbose_name='Associated images (zip file)', blank=True)), ('encoding', models.CharField(default=b'utf-8', max_length=15, verbose_name='Encoding', choices=[(b'windows-1252', b'windows-1252'), (b'ISO-8859-15', b'ISO-8859-15'), (b'utf-8', b'utf-8')])), ('skip_lines', models.IntegerField(default=1, verbose_name='Skip lines')), ('error_file', models.FileField(max_length=255, upload_to=b'upload/imports/', null=True, verbose_name='Error file', blank=True)), ('result_file', models.FileField(max_length=255, upload_to=b'upload/imports/', null=True, verbose_name='Result file', blank=True)), ('match_file', models.FileField(max_length=255, upload_to=b'upload/imports/', null=True, verbose_name='Match file', blank=True)), ('state', models.CharField(default=b'C', max_length=2, verbose_name='State', choices=[(b'C', 'Created'), (b'AP', 'Analyse in progress'), (b'A', 'Analysed'), (b'P', 'Import pending'), (b'IP', 'Import in progress'), (b'FE', 'Finished with errors'), (b'F', 'Finished'), (b'AC', 'Archived')])), ('conservative_import', models.BooleanField(default=False, help_text=b'If set to true, do not overload existing values', verbose_name='Conservative import')), ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation date', null=True)), ('end_date', models.DateTimeField(verbose_name='End date', null=True, editable=False, blank=True)), ('seconds_remaining', models.IntegerField(verbose_name='Remaining seconds', null=True, editable=False, blank=True)), ], options={ 'verbose_name': 'Import', 'verbose_name_plural': 'Imports', }, ), migrations.CreateModel( name='ImporterColumn', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=200, null=True, verbose_name='Label', blank=True)), ('col_number', models.IntegerField(default=1, verbose_name='Column number')), ('description', models.TextField(null=True, verbose_name='Description', blank=True)), ('required', models.BooleanField(default=False, verbose_name='Required')), ('export_field_name', models.CharField(help_text='Fill this field if the field name is ambiguous for export. For instance: concatenated fields.', max_length=200, null=True, verbose_name='Export field name', blank=True)), ], options={ 'ordering': ('importer_type', 'col_number'), 'verbose_name': 'Importer - Column', 'verbose_name_plural': 'Importer - Columns', }, ), migrations.CreateModel( name='ImporterDefault', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('target', models.CharField(max_length=500, verbose_name='Target')), ], options={ 'verbose_name': 'Importer - Default', 'verbose_name_plural': 'Importer - Defaults', }, ), migrations.CreateModel( name='ImporterDefaultValues', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('target', models.CharField(max_length=500, verbose_name='Target')), ('value', models.CharField(max_length=500, verbose_name='Value')), ('default_target', models.ForeignKey(related_name='default_values', to='ishtar_common.ImporterDefault')), ], options={ 'verbose_name': 'Importer - Default value', 'verbose_name_plural': 'Importer - Default values', }, ), migrations.CreateModel( name='ImporterDuplicateField', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('field_name', models.CharField(max_length=200, null=True, verbose_name='Field name', blank=True)), ('force_new', models.BooleanField(default=False, verbose_name='Force creation of new items')), ('concat', models.BooleanField(default=False, verbose_name='Concatenate with existing')), ('concat_str', models.CharField(max_length=5, null=True, verbose_name='Concatenate character', blank=True)), ('column', models.ForeignKey(related_name='duplicate_fields', to='ishtar_common.ImporterColumn')), ], options={ 'verbose_name': 'Importer - Duplicate field', 'verbose_name_plural': 'Importer - Duplicate fields', }, ), migrations.CreateModel( name='ImporterModel', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=200, verbose_name='Name')), ('klass', models.CharField(max_length=200, verbose_name='Class name')), ], options={ 'ordering': ('name',), 'verbose_name': 'Importer - Model', 'verbose_name_plural': 'Importer - Models', }, ), migrations.CreateModel( name='ImporterType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=100, null=True, verbose_name='Name', blank=True)), ('slug', models.SlugField(null=True, max_length=100, blank=True, unique=True, verbose_name='Slug')), ('description', models.CharField(max_length=500, null=True, verbose_name='Description', blank=True)), ('is_template', models.BooleanField(default=False, verbose_name='Is template')), ('unicity_keys', models.CharField(max_length=500, null=True, verbose_name='Unicity keys (separator ";")', blank=True)), ('associated_models', models.ForeignKey(related_name='+', verbose_name='Associated model', blank=True, to='ishtar_common.ImporterModel', null=True)), ('created_models', models.ManyToManyField(help_text='Leave blank for no restrictions', related_name='+', verbose_name='Models that can accept new items', to='ishtar_common.ImporterModel', blank=True)), ], options={ 'ordering': ('name',), 'verbose_name': 'Importer - Type', 'verbose_name_plural': 'Importer - Types', }, ), migrations.CreateModel( name='ImportTarget', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('target', models.CharField(max_length=500, verbose_name='Target')), ('force_new', models.BooleanField(default=False, verbose_name='Force creation of new items')), ('concat', models.BooleanField(default=False, verbose_name='Concatenate with existing')), ('concat_str', models.CharField(max_length=5, null=True, verbose_name='Concatenate character', blank=True)), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('column', models.ForeignKey(related_name='targets', to='ishtar_common.ImporterColumn')), ('formater_type', models.ForeignKey(to='ishtar_common.FormaterType')), ], options={ 'verbose_name': 'Importer - Target', 'verbose_name_plural': 'Importer - Targets', }, ), migrations.CreateModel( name='IshtarSiteProfile', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.TextField(verbose_name='Name')), ('slug', models.SlugField(unique=True, verbose_name='Slug')), ('description', models.TextField(null=True, verbose_name='Description', blank=True)), ('base_color', models.CharField(default=b'rgba(0, 0, 0, 0)', max_length=200, verbose_name='CSS color code for base module')), ('files', models.BooleanField(default=False, verbose_name='Files module')), ('files_color', models.CharField(default=b'rgba(0, 32, 210, 0.1)', max_length=200, verbose_name='CSS color code for files module')), ('context_record', models.BooleanField(default=False, verbose_name='Context records module')), ('context_record_color', models.CharField(default=b'rgba(210,200,0,0.2)', max_length=200, verbose_name='CSS color code for context record module')), ('find', models.BooleanField(default=False, help_text='Need context records module', verbose_name='Finds module')), ('find_index', models.CharField(default=b'O', help_text='To prevent irrelevant indexes, change this parameter only if there is no find in the database', max_length=2, verbose_name='Find index is based on', choices=[('O', 'Operations'), ('CR', 'Context records')])), ('find_color', models.CharField(default=b'rgba(210,0,0,0.15)', max_length=200, verbose_name='CSS color code for find module')), ('warehouse', models.BooleanField(default=False, help_text='Need finds module', verbose_name='Warehouses module')), ('warehouse_color', models.CharField(default=b'rgba(10,20,200,0.15)', max_length=200, verbose_name='CSS code for warehouse module')), ('mapping', models.BooleanField(default=False, verbose_name='Mapping module')), ('mapping_color', models.CharField(default=b'rgba(72, 236, 0, 0.15)', max_length=200, verbose_name='CSS code for mapping module')), ('homepage', models.TextField(help_text='Homepage of Ishtar - if not defined a default homepage will appear. Use the markdown syntax. {random_image} can be used to display a random image.', null=True, verbose_name='Home page', blank=True)), ('file_external_id', models.TextField(default=b'{year}-{numeric_reference}', help_text='Formula to manage file external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='File external id')), ('parcel_external_id', models.TextField(default=b'{associated_file__external_id}{operation__code_patriarche}-{town__numero_insee}-{section}{parcel_number}', help_text='Formula to manage parcel external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Parcel external id')), ('context_record_external_id', models.TextField(default=b'{parcel__external_id}-{label}', help_text='Formula to manage context record external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Context record external id')), ('base_find_external_id', models.TextField(default=b'{context_record__external_id}-{label}', help_text='Formula to manage base find external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Base find external id')), ('find_external_id', models.TextField(default=b'{get_first_base_find__context_record__external_id}-{label}', help_text='Formula to manage find external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Find external id')), ('container_external_id', models.TextField(default=b'{responsible__external_id}-{index}', help_text='Formula to manage container external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Container external id')), ('warehouse_external_id', models.TextField(default=b'{name|slug}', help_text='Formula to manage warehouse external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Warehouse external id')), ('person_raw_name', models.TextField(default=b'{name|upper} {surname}', help_text='Formula to manage person raw_name. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Raw name for person')), ('active', models.BooleanField(default=False, verbose_name='Current active')), ('currency', models.CharField(default='\u20ac', max_length=b'5', verbose_name='Currency', choices=[('\u20ac', 'Euro'), ('$', 'US dollar')])), ], options={ 'ordering': ['label'], 'verbose_name': 'Ishtar site profile', 'verbose_name_plural': 'Ishtar site profiles', }, bases=(models.Model, ishtar_common.models.Cached), ), migrations.CreateModel( name='IshtarUser', fields=[ ('user_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)), ('advanced_shortcut_menu', models.BooleanField(default=False, verbose_name='Advanced shortcut menu')), ], options={ 'verbose_name': 'Ishtar user', 'verbose_name_plural': 'Ishtar users', }, bases=('auth.user',), managers=[ (b'objects', django.contrib.auth.models.UserManager()), ], ), migrations.CreateModel( name='ItemKey', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('key', models.CharField(max_length=100, verbose_name='Key')), ('object_id', models.PositiveIntegerField()), ('content_type', models.ForeignKey(to='contenttypes.ContentType')), ('importer', models.ForeignKey(blank=True, to='ishtar_common.Import', help_text='Specific key to an import', null=True)), ], ), migrations.CreateModel( name='OperationType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ('order', models.IntegerField(default=1, verbose_name='Order')), ('preventive', models.BooleanField(default=True, verbose_name='Is preventive')), ], options={ 'ordering': ['-preventive', 'order', 'label'], 'verbose_name': 'Operation type', 'verbose_name_plural': 'Operation types', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='Organization', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('address', models.TextField(null=True, verbose_name='Address', blank=True)), ('address_complement', models.TextField(null=True, verbose_name='Address complement', blank=True)), ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Postal code', blank=True)), ('town', models.CharField(max_length=70, null=True, verbose_name='Town', blank=True)), ('country', models.CharField(max_length=30, null=True, verbose_name='Country', blank=True)), ('alt_address', models.TextField(null=True, verbose_name='Other address: address', blank=True)), ('alt_address_complement', models.TextField(null=True, verbose_name='Other address: address complement', blank=True)), ('alt_postal_code', models.CharField(max_length=10, null=True, verbose_name='Other address: postal code', blank=True)), ('alt_town', models.CharField(max_length=70, null=True, verbose_name='Other address: town', blank=True)), ('alt_country', models.CharField(max_length=30, null=True, verbose_name='Other address: country', blank=True)), ('phone', models.CharField(max_length=18, null=True, verbose_name='Phone', blank=True)), ('phone_desc', models.CharField(max_length=300, null=True, verbose_name='Phone description', blank=True)), ('phone2', models.CharField(max_length=18, null=True, verbose_name='Phone description 2', blank=True)), ('phone_desc2', models.CharField(max_length=300, null=True, verbose_name='Phone description 2', blank=True)), ('phone3', models.CharField(max_length=18, null=True, verbose_name='Phone 3', blank=True)), ('phone_desc3', models.CharField(max_length=300, null=True, verbose_name='Phone description 3', blank=True)), ('raw_phone', models.TextField(null=True, verbose_name='Raw phone', blank=True)), ('mobile_phone', models.CharField(max_length=18, null=True, verbose_name='Mobile phone', blank=True)), ('email', models.EmailField(max_length=300, null=True, verbose_name='Email', blank=True)), ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), ('merge_key', models.TextField(null=True, verbose_name='Merge key', blank=True)), ('archived', models.NullBooleanField(default=False)), ('name', models.CharField(max_length=500, verbose_name='Name')), ('history_creator', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True)), ('history_modifier', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Last editor', blank=True, to=settings.AUTH_USER_MODEL, null=True)), ('imports', models.ManyToManyField(related_name='imported_ishtar_common_organization', to='ishtar_common.Import', blank=True)), ('merge_candidate', models.ManyToManyField(related_name='merge_candidate_rel_+', to='ishtar_common.Organization', blank=True)), ('merge_exclusion', models.ManyToManyField(related_name='merge_exclusion_rel_+', to='ishtar_common.Organization', blank=True)), ], options={ 'verbose_name': 'Organization', 'verbose_name_plural': 'Organizations', 'permissions': (('view_organization', 'Peut voir toutes les Organisations'), ('view_own_organization', 'Peut voir sa propre Organisation'), ('add_own_organization', 'Peut ajouter sa propre Organisation'), ('change_own_organization', 'Peut modifier sa propre Organisation'), ('delete_own_organization', 'Peut supprimer sa propre Organisation')), }, bases=(models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter), ), migrations.CreateModel( name='OrganizationType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ], options={ 'ordering': ('label',), 'verbose_name': 'Organization type', 'verbose_name_plural': 'Organization types', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='Person', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('address', models.TextField(null=True, verbose_name='Address', blank=True)), ('address_complement', models.TextField(null=True, verbose_name='Address complement', blank=True)), ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Postal code', blank=True)), ('town', models.CharField(max_length=70, null=True, verbose_name='Town', blank=True)), ('country', models.CharField(max_length=30, null=True, verbose_name='Country', blank=True)), ('alt_address', models.TextField(null=True, verbose_name='Other address: address', blank=True)), ('alt_address_complement', models.TextField(null=True, verbose_name='Other address: address complement', blank=True)), ('alt_postal_code', models.CharField(max_length=10, null=True, verbose_name='Other address: postal code', blank=True)), ('alt_town', models.CharField(max_length=70, null=True, verbose_name='Other address: town', blank=True)), ('alt_country', models.CharField(max_length=30, null=True, verbose_name='Other address: country', blank=True)), ('phone', models.CharField(max_length=18, null=True, verbose_name='Phone', blank=True)), ('phone_desc', models.CharField(max_length=300, null=True, verbose_name='Phone description', blank=True)), ('phone2', models.CharField(max_length=18, null=True, verbose_name='Phone description 2', blank=True)), ('phone_desc2', models.CharField(max_length=300, null=True, verbose_name='Phone description 2', blank=True)), ('phone3', models.CharField(max_length=18, null=True, verbose_name='Phone 3', blank=True)), ('phone_desc3', models.CharField(max_length=300, null=True, verbose_name='Phone description 3', blank=True)), ('raw_phone', models.TextField(null=True, verbose_name='Raw phone', blank=True)), ('mobile_phone', models.CharField(max_length=18, null=True, verbose_name='Mobile phone', blank=True)), ('email', models.EmailField(max_length=300, null=True, verbose_name='Email', blank=True)), ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), ('merge_key', models.TextField(null=True, verbose_name='Merge key', blank=True)), ('archived', models.NullBooleanField(default=False)), ('old_title', models.CharField(blank=True, max_length=100, null=True, verbose_name='Title', choices=[(b'Mr', 'Mr'), (b'Ms', 'Miss'), (b'Mr and Miss', 'Mr and Mrs'), (b'Md', 'Mrs'), (b'Dr', 'Doctor')])), ('salutation', models.CharField(max_length=200, null=True, verbose_name='Salutation', blank=True)), ('surname', models.CharField(max_length=50, null=True, verbose_name='Surname', blank=True)), ('name', models.CharField(max_length=200, null=True, verbose_name='Name', blank=True)), ('raw_name', models.CharField(max_length=300, null=True, verbose_name='Raw name', blank=True)), ('contact_type', models.CharField(max_length=300, null=True, verbose_name='Contact type', blank=True)), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('attached_to', models.ForeignKey(related_name='members', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Is attached to', blank=True, to='ishtar_common.Organization', null=True)), ('history_creator', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True)), ('history_modifier', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Last editor', blank=True, to=settings.AUTH_USER_MODEL, null=True)), ('imports', models.ManyToManyField(related_name='imported_ishtar_common_person', to='ishtar_common.Import', blank=True)), ('merge_candidate', models.ManyToManyField(related_name='merge_candidate_rel_+', to='ishtar_common.Person', blank=True)), ('merge_exclusion', models.ManyToManyField(related_name='merge_exclusion_rel_+', to='ishtar_common.Person', blank=True)), ], options={ 'verbose_name': 'Person', 'verbose_name_plural': 'Persons', 'permissions': (('view_person', 'Peut voir toutes les Personnes'), ('view_own_person', 'Peut voir sa propre Personne'), ('add_own_person', 'Peut ajouter sa propre Personne'), ('change_own_person', 'Peut modifier sa propre Personne'), ('delete_own_person', 'Peut supprimer sa propre Personne')), }, bases=(models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter), ), migrations.CreateModel( name='PersonType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ('groups', models.ManyToManyField(to='auth.Group', verbose_name='Groups', blank=True)), ], options={ 'ordering': ('label',), 'verbose_name': 'Person type', 'verbose_name_plural': 'Person types', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='Regexp', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=100, verbose_name='Name')), ('description', models.CharField(max_length=500, null=True, verbose_name='Description', blank=True)), ('regexp', models.CharField(max_length=500, verbose_name='Regular expression')), ], options={ 'verbose_name': 'Importer - Regular expression', 'verbose_name_plural': 'Importer - Regular expressions', }, ), migrations.CreateModel( name='SourceType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ], options={ 'ordering': ['label'], 'verbose_name': 'Source type', 'verbose_name_plural': 'Source types', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='SpatialReferenceSystem', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ('order', models.IntegerField(default=10, verbose_name='Order')), ('auth_name', models.CharField(default=b'EPSG', max_length=256, verbose_name='Authority name')), ('srid', models.IntegerField(verbose_name='Authority SRID')), ], options={ 'ordering': ('label',), 'verbose_name': 'Spatial reference system', 'verbose_name_plural': 'Spatial reference systems', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='State', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=30, verbose_name='Label')), ('number', models.CharField(unique=True, max_length=3, verbose_name='Number')), ], options={ 'ordering': ['number'], 'verbose_name': 'State', }, ), migrations.CreateModel( name='SupportType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ], options={ 'verbose_name': 'Support type', 'verbose_name_plural': 'Support types', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='TargetKey', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('key', models.TextField(verbose_name='Key')), ('value', models.TextField(null=True, verbose_name='Value', blank=True)), ('is_set', models.BooleanField(default=False, verbose_name='Is set')), ('associated_import', models.ForeignKey(blank=True, to='ishtar_common.Import', null=True)), ('associated_user', models.ForeignKey(blank=True, to='ishtar_common.IshtarUser', null=True)), ('target', models.ForeignKey(related_name='keys', to='ishtar_common.ImportTarget')), ], options={ 'verbose_name': 'Importer - Target key', 'verbose_name_plural': 'Importer - Targets keys', }, ), migrations.CreateModel( name='TitleType', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('label', models.CharField(max_length=100, verbose_name='Label')), ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), ('available', models.BooleanField(default=True, verbose_name='Available')), ], options={ 'ordering': ('label',), 'verbose_name': 'Title type', 'verbose_name_plural': 'Title types', }, bases=(ishtar_common.models.Cached, models.Model), ), migrations.CreateModel( name='Town', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=100, verbose_name='Name')), ('surface', models.IntegerField(null=True, verbose_name='Surface (m2)', blank=True)), ('center', django.contrib.gis.db.models.fields.PointField(srid=27572, null=True, verbose_name='Localisation', blank=True)), ('numero_insee', models.CharField(unique=True, max_length=6, verbose_name='Num\xe9ro INSEE')), ('canton', models.ForeignKey(verbose_name='Canton', blank=True, to='ishtar_common.Canton', null=True)), ('departement', models.ForeignKey(verbose_name='D\xe9partement', blank=True, to='ishtar_common.Department', null=True)), ('imports', models.ManyToManyField(related_name='imported_ishtar_common_town', to='ishtar_common.Import', blank=True)), ], options={ 'ordering': ['numero_insee'], 'verbose_name': 'Town', 'verbose_name_plural': 'Towns', }, ), migrations.AddField( model_name='person', name='person_types', field=models.ManyToManyField(to='ishtar_common.PersonType', verbose_name='Types'), ), migrations.AddField( model_name='person', name='title', field=models.ForeignKey(verbose_name='Title', blank=True, to='ishtar_common.TitleType', null=True), ), migrations.AddField( model_name='organization', name='organization_type', field=models.ForeignKey(verbose_name='Type', to='ishtar_common.OrganizationType'), ), migrations.AddField( model_name='ishtaruser', name='person', field=models.OneToOneField(related_name='ishtaruser', verbose_name='Person', to='ishtar_common.Person'), ), migrations.AddField( model_name='importtarget', name='regexp_filter', field=models.ForeignKey(blank=True, to='ishtar_common.Regexp', null=True), ), migrations.AddField( model_name='importertype', name='users', field=models.ManyToManyField(to='ishtar_common.IshtarUser', verbose_name='Users', blank=True), ), migrations.AddField( model_name='importerdefault', name='importer_type', field=models.ForeignKey(related_name='defaults', to='ishtar_common.ImporterType'), ), migrations.AddField( model_name='importercolumn', name='importer_type', field=models.ForeignKey(related_name='columns', to='ishtar_common.ImporterType'), ), migrations.AddField( model_name='importercolumn', name='regexp_pre_filter', field=models.ForeignKey(blank=True, to='ishtar_common.Regexp', null=True), ), migrations.AddField( model_name='import', name='importer_type', field=models.ForeignKey(to='ishtar_common.ImporterType'), ), migrations.AddField( model_name='import', name='user', field=models.ForeignKey(to='ishtar_common.IshtarUser'), ), migrations.AddField( model_name='historicalperson', name='attached_to', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Organization', null=True), ), migrations.AddField( model_name='historicalperson', name='history_creator', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True), ), migrations.AddField( model_name='historicalperson', name='history_modifier', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True), ), migrations.AddField( model_name='historicalperson', name='history_user', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True), ), migrations.AddField( model_name='historicalperson', name='title', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.TitleType', null=True), ), migrations.AddField( model_name='historicalorganization', name='history_creator', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True), ), migrations.AddField( model_name='historicalorganization', name='history_modifier', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True), ), migrations.AddField( model_name='historicalorganization', name='history_user', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True), ), migrations.AddField( model_name='historicalorganization', name='organization_type', field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.OrganizationType', null=True), ), migrations.AlterUniqueTogether( name='formatertype', unique_together=set([('formater_type', 'options', 'many_split')]), ), migrations.AddField( model_name='department', name='state', field=models.ForeignKey(verbose_name='State', blank=True, to='ishtar_common.State', null=True), ), migrations.AddField( model_name='author', name='author_type', field=models.ForeignKey(verbose_name='Author type', to='ishtar_common.AuthorType'), ), migrations.AddField( model_name='author', name='person', field=models.ForeignKey(related_name='author', verbose_name='Person', to='ishtar_common.Person'), ), migrations.AddField( model_name='arrondissement', name='department', field=models.ForeignKey(verbose_name='D\xe9partement', to='ishtar_common.Department'), ), migrations.AlterUniqueTogether( name='targetkey', unique_together=set([('target', 'key', 'associated_user', 'associated_import')]), ), migrations.AlterUniqueTogether( name='importercolumn', unique_together=set([('importer_type', 'col_number')]), ), migrations.CreateModel( name='AdministrationScript', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('path', models.CharField(max_length=30, verbose_name='Filename')), ('name', models.TextField(null=True, verbose_name='Name', blank=True)), ], options={ 'ordering': ['name'], 'verbose_name': 'Administration script', 'verbose_name_plural': 'Administration scripts', }, ), migrations.CreateModel( name='AdministrationTask', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('state', models.CharField(default=b'S', max_length=2, verbose_name='State', choices=[(b'S', 'Scheduled'), (b'P', 'In progress'), (b'FE', 'Finished with errors'), (b'F', 'Finished')])), ('creation_date', models.DateTimeField(default=datetime.datetime.now)), ('launch_date', models.DateTimeField(null=True, blank=True)), ('finished_date', models.DateTimeField(null=True, blank=True)), ('result', models.TextField(null=True, verbose_name='Result', blank=True)), ('script', models.ForeignKey(to='ishtar_common.AdministrationScript')), ], options={ 'ordering': ['script'], 'verbose_name': 'Administration task', 'verbose_name_plural': 'Administration tasks', }, ), ]