Don’t allow dots in column names, fixes #86.

This commit is contained in:
Friedrich Lindenberg
2015-05-21 23:21:47 +02:00
parent a95c7be33b
commit 19cc76dd60
2 changed files with 14 additions and 0 deletions
+5
View File
@@ -219,6 +219,11 @@ class Table(object):
"""
self._check_dropped()
self.database._acquire()
# check that column name is OK:
if '.' in name:
raise ValueError("Invalid column name: %r" % name)
try:
if name not in self.table.columns.keys():
self.database.op.add_column(