def register(self, bdb):
with bdb.savepoint():
schema_sql = "SELECT version FROM bayesdb_metamodel WHERE name = ?"
cursor = bdb.sql_execute(schema_sql, (self.name(),))
version = None
try:
row = cursor.next()
After Change
def register(self, bdb):
with bdb.savepoint():
version = bayesdb_metamodel_version(bdb, self.name())
if version is None:
bdb.sql_execute(nig_normal_schema_1)
version = 1