mirror of
https://github.com/evennia/evennia.git
synced 2026-03-31 13:07:16 +02:00
Migrations work under sqlite3, both from latest dev, from new install and from trunk. There might be some consistency issues though (it seems the character list is not properly migrated), so more testing is required.
This commit is contained in:
parent
8bd8193ab9
commit
230d73cfa0
16 changed files with 2941 additions and 463 deletions
|
|
@ -9,7 +9,7 @@ try:
|
|||
except ImportError:
|
||||
import pickle
|
||||
from src.utils.utils import to_str, to_unicode
|
||||
from src.typeclasses.models import PackedDBobject
|
||||
#from src.typeclasses.models import PackedDBobject
|
||||
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
CTYPEGET = ContentType.objects.get
|
||||
|
|
@ -17,6 +17,37 @@ GA = object.__getattribute__
|
|||
SA = object.__setattr__
|
||||
DA = object.__delattr__
|
||||
|
||||
class PackedDBobject(object):
|
||||
"""
|
||||
Attribute helper class.
|
||||
A container for storing and easily identifying database objects in
|
||||
the database (which doesn't suppport storing db_objects directly).
|
||||
"""
|
||||
def __init__(self, ID, db_model, db_key):
|
||||
self.id = ID
|
||||
self.db_model = db_model
|
||||
self.key = db_key
|
||||
def __str__(self):
|
||||
return "%s(#%s)" % (self.key, self.id)
|
||||
def __unicode__(self):
|
||||
return u"%s(#%s)" % (self.key, self.id)
|
||||
|
||||
class PackedDBobject(object):
|
||||
"""
|
||||
Attribute helper class.
|
||||
A container for storing and easily identifying database objects in
|
||||
the database (which doesn't suppport storing db_objects directly).
|
||||
"""
|
||||
def __init__(self, ID, db_model, db_key):
|
||||
self.id = ID
|
||||
self.db_model = db_model
|
||||
self.key = db_key
|
||||
def __str__(self):
|
||||
return "%s(#%s)" % (self.key, self.id)
|
||||
def __unicode__(self):
|
||||
return u"%s(#%s)" % (self.key, self.id)
|
||||
|
||||
|
||||
class PackedDict(dict):
|
||||
"""
|
||||
Attribute helper class.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue