

def _create_project(self, project):
    assert (re.match('^\\w+$', project) is not None)
    tablename = self._tablename(project)
    self._execute(('CREATE TABLE IF NOT EXISTS `%s` (\n                taskid PRIMARY KEY,\n                project,\n                url, status,\n                schedule, fetch, process, track,\n                lastcrawltime, updatetime\n                )' % tablename))
    self._execute(('CREATE INDEX `status_%s_index` ON %s (status)' % (tablename, self.escape(tablename))))

dataset/ETHPy150Open binux/pyspider/pyspider/database/sqlite/taskdb.py TaskDB._create_project/original