Migration missing?
Closed this issue · 5 comments
>>> email.send()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/vagrant/env/lib/python2.6/site-packages/django/core/mail/message.py", line 276, in send
return self.get_connection(fail_silently).send_messages([self])
File "/vagrant/env/lib/python2.6/site-packages/djmail/backends/base.py", line 24, in send_messages
return self._send_messages(email_messages)
File "/vagrant/env/lib/python2.6/site-packages/djmail/backends/default.py", line 13, in _send_messages
return core._send_messages(email_messages)
File "/vagrant/env/lib/python2.6/site-packages/djmail/core.py", line 80, in _send_messages
for email in email_messages]
File "/vagrant/env/lib/python2.6/site-packages/djmail/models.py", line 76, in from_email_message
instance.save()
File "/vagrant/env/lib/python2.6/site-packages/django/db/models/base.py", line 545, in save
force_update=force_update, update_fields=update_fields)
File "/vagrant/env/lib/python2.6/site-packages/django/db/models/base.py", line 573, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/vagrant/env/lib/python2.6/site-packages/django/db/models/base.py", line 635, in _save_table
forced_update)
File "/vagrant/env/lib/python2.6/site-packages/django/db/models/base.py", line 679, in _do_update
return filtered._update(values) > 0
File "/vagrant/env/lib/python2.6/site-packages/django/db/models/query.py", line 510, in _update
return query.get_compiler(self.db).execute_sql(None)
File "/vagrant/env/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 980, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/vagrant/env/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/vagrant/env/lib/python2.6/site-packages/django/db/backends/util.py", line 69, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/vagrant/env/lib/python2.6/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/vagrant/env/lib/python2.6/site-packages/django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/vagrant/env/lib/python2.6/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/vagrant/env/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py", line 452, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: no such table: djmail_message
I think we are missing a migration here.
I could provide a pull request right now but I am studying how to create a migration without manage.py :-)
Also I don't know how to provide migrations to Django 1.7 and I don't even know if you want to provide them.
Let me know if I can help.
hey @niwibe thanks!
But I think we are still missing migrations for non 1.7+ Django apps.
Do you want djmail to be 1.6 Django compatible? Let me know. :-)
Yes, it would be great, but currently all my apps are running under django 1.7.x.
In any case, django < 1.7 should work well without migrations, because south is not mandatory dependency for django. I have used that package without migrations for some time.
In any case, if you want provide south migrations, I'm gladly accept the PR ;)
Ah ok! I am going to make a pull request soon. Thank you!