don't mod schema when adding new models

This commit is contained in:
Damien Elmes 2011-11-24 16:33:40 +09:00
parent eac9a00b22
commit fae153c2af

View file

@ -273,6 +273,10 @@ select id from cards where nid in (select id from notes where mid = ?)""",
f['ord'] = c f['ord'] = c
def _transformFields(self, m, fn): def _transformFields(self, m, fn):
if not self.col.db.scalar(
"select 1 from notes where mid = ? limit 1", m['id']):
# don't bump schema for a new model
return
self.col.modSchema() self.col.modSchema()
r = [] r = []
for (id, flds) in self.col.db.execute( for (id, flds) in self.col.db.execute(