Ticket #23982: migrations_bug_with_python2_python3.txt

File migrations_bug_with_python2_python3.txt, 1.9 KB (added by Luke Plant, 9 years ago)
Line 
1$ mkdir bugtest
2$ cd bugtest
3$ virtualenv --python=python2.7 env_p27
4Running virtualenv with interpreter /usr/bin/python2.7
5New python executable in env_p27/bin/python2.7
6Also creating executable in env_p27/bin/python
7Please make sure you remove any previous custom paths from your /home/luke/.pydistutils.cfg file.
8Installing setuptools, pip...done.
9
10$ source env_p27/bin/activate
11$ pip install Django==1.7.1
12Downloading/unpacking Django==1.7.1
13 Using download cache from /home/luke/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fpy2.py3%2FD%2FDjango%2FDjango-1.7.1-py2.py3-none-any.whl
14Installing collected packages: Django
15Successfully installed Django
16Cleaning up...
17$ django-admin.py startproject migrationsbug
18$ cd migrationsbug
19$ ./manage.py startapp test1
20$ cat > test1/models.py
21from django.db import models
22
23class MyModel(models.Model):
24 name = models.CharField("First Name", max_length=255, blank=True)
25
26^D
27$ perl -n -i -p -e 's/INSTALLED_APPS = \(/INSTALLED_APPS = \("test1",/' migrationsbug/settings.py
28$ ./manage.py makemigrations test1
29Migrations for 'test1':
30 0001_initial.py:
31 - Create model MyModel
32$ cd ../
33$ deactivate
34$ virtualenv --python=python3.4 env_p34
35Running virtualenv with interpreter /usr/bin/python3.4
36Using base prefix '/usr'
37New python executable in env_p34/bin/python3.4
38Also creating executable in env_p34/bin/python
39Please make sure you remove any previous custom paths from your /home/luke/.pydistutils.cfg file.
40Installing setuptools, pip...done.
41$ source env_p34/bin/activate
42$ pip install Django==1.7.1
43
44Downloading/unpacking Django==1.7.1
45 Using download cache from /home/luke/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fpy2.py3%2FD%2FDjango%2FDjango-1.7.1-py2.py3-none-any.whl
46Installing collected packages: Django
47Successfully installed Django
48Cleaning up...
49
50$ cd migrationsbug
51$./manage.py makemigrations test1
52Migrations for 'test1':
53 0002_auto_20141211_1527.py:
54 - Alter field name on mymodel
Back to Top