allow tables with no primary keys
This commit is contained in:
1 parent
e64c556f84
commit
0b84911d38
2 files changed
+4
-3
No files matched your search
@@ -1 +1 @@
|
|||||||
Version 2.4.6-stable+timestamp.2013.05.14.00.28.50
|
Version 2.4.6-stable+timestamp.2013.05.15.11.18.49
|
||||||
+3
-2
@@ -928,7 +928,7 @@ class BaseAdapter(ConnectionPool):
|
|||||||
foreign_key = ', '.join(pkeys),
|
foreign_key = ', '.join(pkeys),
|
||||||
on_delete_action = field.ondelete)
|
on_delete_action = field.ondelete)
|
||||||
|
|
||||||
if hasattr(table,'_primarykey'):
|
if getattr(table,'_primarykey',None):
|
||||||
query = "CREATE TABLE %s(\n %s,\n %s) %s" % \
|
query = "CREATE TABLE %s(\n %s,\n %s) %s" % \
|
||||||
(tablename, fields,
|
(tablename, fields,
|
||||||
self.PRIMARY_KEY(', '.join(table._primarykey)),other)
|
self.PRIMARY_KEY(', '.join(table._primarykey)),other)
|
||||||
@@ -1856,7 +1856,7 @@ class BaseAdapter(ConnectionPool):
|
|||||||
if have_serializers:
|
if have_serializers:
|
||||||
obj = serializers.json(obj)
|
obj = serializers.json(obj)
|
||||||
elif simplejson:
|
elif simplejson:
|
||||||
obj = simplejson.dumps(obj)
|
obj = simplejson.dumps(items)
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("missing simplejson")
|
raise RuntimeError("missing simplejson")
|
||||||
if not isinstance(obj,bytes):
|
if not isinstance(obj,bytes):
|
||||||
@@ -3366,6 +3366,7 @@ class VerticaAdapter(MSSQLAdapter):
|
|||||||
'big-reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
|
'big-reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def EXTRACT(self, first, what):
|
def EXTRACT(self, first, what):
|
||||||
return "DATE_PART('%s', TIMESTAMP %s)" % (what, self.expand(first))
|
return "DATE_PART('%s', TIMESTAMP %s)" % (what, self.expand(first))
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user