From 7e149f817c478637a671a6b20a24eed0c12abfde Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 2 May 2019 00:41:29 +1000 Subject: [PATCH 1/4] Small change to uuid should trigger migrations --- .travis.yml | 1 + InvenTree/stock/models.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 37ad7c425c..fac160feb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ before_install: script: - make coverage - make style + - git ls-files --exclude-standard --others after_success: - coveralls \ No newline at end of file diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index cb0ad8aea4..1be1385f5f 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -127,7 +127,7 @@ class StockItem(models.Model): ] # UUID for generating QR codes - uuid = models.UUIDField(default=uuid.uuid4, blank=True, editable=False) + uuid = models.UUIDField(default=uuid.uuid4, blank=True, editable=False, help_text='Unique ID for the StockItem') # The 'master' copy of the part of which this stock item is an instance part = models.ForeignKey('part.Part', on_delete=models.CASCADE, related_name='locations') From 25e29521bae000ad58c9537ac9645fa7fe241927 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 2 May 2019 00:46:59 +1000 Subject: [PATCH 2/4] Shoud fail this time --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fac160feb4..74f10c1922 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,9 @@ before_install: - make migrate script: + - test -z "$(git ls-files --exclude-standard --others)" - make coverage - make style - - git ls-files --exclude-standard --others after_success: - coveralls \ No newline at end of file From 8a8de2b78fb49f2ae8bedf4f825e370b4aaafcd0 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 2 May 2019 00:49:30 +1000 Subject: [PATCH 3/4] Add migration file - Should pass this time --- .../migrations/0011_auto_20190502_0041.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 InvenTree/stock/migrations/0011_auto_20190502_0041.py diff --git a/InvenTree/stock/migrations/0011_auto_20190502_0041.py b/InvenTree/stock/migrations/0011_auto_20190502_0041.py new file mode 100644 index 0000000000..b540421de5 --- /dev/null +++ b/InvenTree/stock/migrations/0011_auto_20190502_0041.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2 on 2019-05-01 14:41 + +from django.db import migrations, models +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + ('stock', '0010_auto_20190501_2344'), + ] + + operations = [ + migrations.AlterField( + model_name='stockitem', + name='uuid', + field=models.UUIDField(blank=True, default=uuid.uuid4, editable=False, help_text='Unique ID for the StockItem'), + ), + ] From ad7201cf5c3ba51301ddadeeaa5b02558b853f50 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 2 May 2019 00:53:38 +1000 Subject: [PATCH 4/4] Look at git output --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 74f10c1922..17b4950914 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ before_install: - make migrate script: + - git ls-files --exclude-standard --others - test -z "$(git ls-files --exclude-standard --others)" - make coverage - make style