X-Git-Url: http://git.osdn.net/view?p=rec10%2Frec10-git.git;a=blobdiff_plain;f=rec10%2FdbMySQL.py;h=b40da126a1ff07e77292a97ba439ca1281b6b2c1;hp=9f37bf585457f7bac039945b1db32778107b49fd;hb=5e3efe657c7aaa3d2b2e758910343ee20c1f795a;hpb=64699e9bff29d55dcb8e5279f8da9d5fbca432aa diff --git a/rec10/dbMySQL.py b/rec10/dbMySQL.py index 9f37bf5..b40da12 100644 --- a/rec10/dbMySQL.py +++ b/rec10/dbMySQL.py @@ -1244,7 +1244,8 @@ vim ") title VARCHAR(1024),\ frompath VARCHAR(1024),\ topath VARCHAR(1024),\ - do BOOLEAN\ + do BOOLEAN,\ + UNIQUE key (title),\ )') except Exception, inst: if not ((type(inst)==MySQLdb.ProgrammingError and inst[0]==1007)or(type(inst)==MySQLdb.OperationalError and inst[0]==1050)): @@ -1257,6 +1258,11 @@ vim ") values (%s,%s,%s,0)', \ (title,frompath, topath)) self.close_db(db) + def delete_refresh_auto_classify(self): + db = self.connect_db() + db[1].execute("\ + TRUNCATE TABLE auto_classify") + self.close_db(db) def delete_old_auto_classify(self, frompath): db = self.connect_db() db[1].execute("\