Skip to content

Commit

Permalink
make sure migrations are up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Crewe committed Nov 15, 2016
1 parent 49239a7 commit 659281b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions csvimport/migrations/0001_initial.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-14 16:03
# Generated by Django 1.10.3 on 2016-11-15 14:46
from __future__ import unicode_literals

import django.core.files.storage
Expand All @@ -19,15 +19,15 @@ class Migration(migrations.Migration):
name='CSVImport',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('model_name', models.CharField(default=b'csvimport.Item', help_text=b'Please specify the app_label.model_name', max_length=255)),
('field_list', models.TextField(blank=True, help_text=b'Enter list of fields in order only if\n you dont have a header row with matching field names, eg.\n "column1=shared_code,column2=org(Organisation|name)"')),
('upload_file', models.FileField(storage=django.core.files.storage.FileSystemStorage(location=''), upload_to=b'csv')),
('model_name', models.CharField(default='csvimport.Item', help_text='Please specify the app_label.model_name', max_length=255)),
('field_list', models.TextField(blank=True, help_text='Enter list of fields in order only if\n you dont have a header row with matching field names, eg.\n "column1=shared_code,column2=org(Organisation|name)"')),
('upload_file', models.FileField(storage=django.core.files.storage.FileSystemStorage(location=''), upload_to='csv')),
('file_name', models.CharField(blank=True, max_length=255)),
('encoding', models.CharField(blank=True, max_length=32)),
('upload_method', models.CharField(choices=[(b'manual', b'manual'), (b'cronjob', b'cronjob')], default=b'manual', max_length=50)),
('error_log', models.TextField(help_text=b'Each line is an import error')),
('upload_method', models.CharField(choices=[('manual', 'manual'), ('cronjob', 'cronjob')], default='manual', max_length=50)),
('error_log', models.TextField(help_text='Each line is an import error')),
('import_date', models.DateField(auto_now=True)),
('import_user', models.CharField(blank=True, default=b'anonymous', help_text=b'User id as text', max_length=255)),
('import_user', models.CharField(blank=True, default='anonymous', help_text='User id as text', max_length=255)),
],
),
migrations.CreateModel(
Expand Down
16 changes: 8 additions & 8 deletions csvimport/migrations/0002_test_models.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-15 10:27
# Generated by Django 1.10.3 on 2016-11-15 14:47
from __future__ import unicode_literals

from django.db import migrations, models
Expand All @@ -23,26 +23,26 @@ class Migration(migrations.Migration):
('alias', models.CharField(max_length=255, null=True)),
],
options={
'db_table': 'csvtests_country',
'managed': True,
'db_table': 'csvtests_country',
},
),
migrations.CreateModel(
name='Item',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('TYPE', models.PositiveIntegerField(default=0)),
('code_share', models.CharField(help_text=b'Cross-organization item code', max_length=32)),
('code_org', models.CharField(help_text=b'Organization-specfific item code', max_length=32)),
('code_share', models.CharField(help_text='Cross-organization item code', max_length=32)),
('code_org', models.CharField(help_text='Organization-specfific item code', max_length=32)),
('description', models.TextField(null=True)),
('quantity', models.PositiveIntegerField(default=1)),
('status', models.CharField(max_length=10, null=True)),
('date', models.DateField(auto_now=True, null=True)),
('country', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='csvimport.Country')),
],
options={
'db_table': 'csvtests_item',
'managed': True,
'db_table': 'csvtests_item',
},
),
migrations.CreateModel(
Expand All @@ -52,8 +52,8 @@ class Migration(migrations.Migration):
('name', models.CharField(max_length=255)),
],
options={
'db_table': 'csvtests_organisation',
'managed': True,
'db_table': 'csvtests_organisation',
},
),
migrations.CreateModel(
Expand All @@ -63,8 +63,8 @@ class Migration(migrations.Migration):
('name', models.CharField(max_length=32)),
],
options={
'db_table': 'csvtests_unitofmeasure',
'managed': True,
'db_table': 'csvtests_unitofmeasure',
},
),
migrations.AddField(
Expand All @@ -75,6 +75,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='item',
name='uom',
field=models.ForeignKey(help_text=b'Unit of Measure', on_delete=django.db.models.deletion.CASCADE, to='csvimport.UnitOfMeasure'),
field=models.ForeignKey(help_text='Unit of Measure', on_delete=django.db.models.deletion.CASCADE, to='csvimport.UnitOfMeasure'),
),
]
4 changes: 2 additions & 2 deletions docs/HISTORY.txt
Expand Up @@ -3,11 +3,11 @@ Changelog

Contributors listed as [github.com username] where they are on github

2.5 - Merge in various pull requests and test with Django 1.7 to 1.10 - 13 Nov 2016
2.5 - Merge in various pull requests and test with Django 1.7 to 1.10 - 15 Nov 2016
-----------------------------------------------------------------------------------

#. Fix for all recent versions of Django and Python
#. Add in delimiter option
#. Add in delimiter option eg. for tab separated values
#. Add migrations
#. Make importcsv parsing more tolerant of unparsable rows in CSV

Expand Down

0 comments on commit 659281b

Please sign in to comment.