Changes between Initial Version and Version 2 of Ticket #27940


Ignore:
Timestamp:
Mar 15, 2017, 1:18:36 AM (8 years ago)
Author:
Sawan Vithlani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27940

    • Property Summary Migrations fail when when Models parent class is changed to abstract -- Wrong SQL being generatedMigrations fail when when a model's parent class is changed to abstract -- Wrong SQL being generated
  • Ticket #27940 – Description

    initial v2  
    4141class BrowserTest(TestCase):
    4242    pass
     43
     44./manage.py makemigrations testbed
     45You are trying to add a non-nullable field 'id' to browsertest without a default; we can't do that (the database needs something to populate existing rows).
     46Please select a fix:
     47 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
     48 2) Quit, and let me add a default in models.py
     49Select an option: 1
     50Please enter the default value now, as valid Python
     51The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
     52Type 'exit' to exit this prompt
     53>>> 1
     54You are trying to add a non-nullable field 'name' to browsertest without a default; we can't do that (the database needs something to populate existing rows).
     55Please select a fix:
     56 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
     57 2) Quit, and let me add a default in models.py
     58Select an option: 1
     59Please enter the default value now, as valid Python
     60The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
     61Type 'exit' to exit this prompt
     62>>> ' '
     63You are trying to add a non-nullable field 'id' to terminaltest without a default; we can't do that (the database needs something to populate existing rows).
     64Please select a fix:
     65 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
     66 2) Quit, and let me add a default in models.py
     67Select an option: 1
     68Please enter the default value now, as valid Python
     69The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
     70Type 'exit' to exit this prompt
     71>>> 1
     72You are trying to add a non-nullable field 'name' to terminaltest without a default; we can't do that (the database needs something to populate existing rows).
     73Please select a fix:
     74 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
     75 2) Quit, and let me add a default in models.py
     76Select an option: 1
     77Please enter the default value now, as valid Python
     78The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
     79Type 'exit' to exit this prompt
     80>>> ' '
     81
     82Migrations for 'testbed':
     83  testbed\migrations\0002_auto_20170315_1711.py:
     84    - Remove field testcase_ptr from browsertest
     85    - Remove field testcase_ptr from terminaltest
     86    - Add field id to browsertest
     87    - Add field name to browsertest
     88    - Add field id to terminaltest
     89    - Add field name to terminaltest
     90    - Delete model TestCase
    4391
    4492$ ./manage.py migrate testbed
Back to Top