Issue 85 in django-jython: I am getting an error when I run the migrate command on Jython-Django 1.7

14 views
Skip to first unread message

django...@googlecode.com

unread,
Sep 8, 2014, 2:35:25 AM9/8/14
to django-j...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 85 by mikemart...@gmail.com: I am getting an error when I run the
migrate command on Jython-Django 1.7
https://code.google.com/p/django-jython/issues/detail?id=85




After creating a project in Django and setting it all up and have
everything running, I began to start creating models.



What steps will reproduce the problem?
1. I first created a model in django with some fields

from django.db import models

# Create your models here.
class Join(models.Model):
email = models.EmailField(unique=True)
ip_address = models.CharField(max_length=120, default="ABC")
#auto_now means when it was added, auto_now means when it is updated
timestamp = models.DateTimeField(auto_now_add = True, auto_now=False)
updated = models.DateTimeField(auto_now_add = False, auto_now=True)

def __unicode__(self):
return "%s" %(self.email)


2. I then run jython manage.py makemigrations joins
3. I then run jython manage.py migrate joins
4. Tables are created in database
5. I forgot to add a field using modeling, so I add it see ref_id below

from django.db import models

# Create your models here.
class Join(models.Model):
email = models.EmailField(unique=True)
ref_id = models.CharField(max_length=120, null=True)
ip_address = models.CharField(max_length=120, default="ABC")
#auto_now means when it was added, auto_now means when it is updated
timestamp = models.DateTimeField(auto_now_add = True, auto_now=False)
updated = models.DateTimeField(auto_now_add = False, auto_now=True)

def __unicode__(self):
return "%s" %(self.email)


6. I then run jython manage.py makemigrations joins
7. I then run jython manage.py migrate joins





What is the expected output?
I was expecting the new field to produce a new column for the existing
table and the column to have default values of "ABC".


What do you see instead?
It errors out badly.


File "C:\jython2.7b2\Lib\site-packages\django_jython-1.7.0b2-py2.7.egg\doj\db\
backends\__init__.py", line 180, in execute
self.cursor.execute(sql, params)
django.db.utils.Error: ERROR: could not determine data type of parameter $1
[SQL
Code: 0], [SQLState: 42P18]

I have attached the entire error in a file to this post.


What version of the product are you using? On what operating system?
I currently have Django1.7c3 running on windows7, Java7, Jython2.7b2,
Postgresql 9.3, postgresql-9.3-1102.jdbc41, and the
django_jython-1.7.0b2-py2.7.egg



Attachments:
error.txt 3.2 KB

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

django...@googlecode.com

unread,
Oct 5, 2014, 4:35:22 AM10/5/14
to django-j...@googlegroups.com
Updates:
Owner: andr...@st0cker.at

Comment #1 on issue 85 by andr...@st0cker.at: I am getting an error when I
run the migrate command on Jython-Django 1.7
https://code.google.com/p/django-jython/issues/detail?id=85

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages