Use string comparison in create_table (Fixes issue #33)

This commit is contained in:
3onyc 2013-11-13 10:05:46 +01:00
parent 6b8a40746c
commit 95ca93cff0

View File

@ -121,12 +121,12 @@ class Database(object):
try:
log.debug("Creating table: %s on %r" % (table_name, self.engine))
table = SQLATable(table_name, self.metadata)
if primary_type is 'Integer':
if primary_type == 'Integer':
auto_flag = False
if primary_id is 'id':
if primary_id == 'id':
auto_flag = True
col = Column(primary_id, Integer, primary_key=True, autoincrement=auto_flag)
elif primary_type is 'Text':
elif primary_type == 'Text':
col = Column(primary_id, Text, primary_key=True)
else:
raise DatasetException(