Esempio n. 1
0
def create_detect_info_table():
    sql = 'create table detectInfo(dtId INT AUTO_INCREMENT PRIMARY KEY, url VARCHAR(100) NOT NULL, hiddenUrl VARCHAR(500), hiddenContent VARCHAR(50), hiddenLevel VARCHAR(10), hiddenType VARCHAR(25)) DEFAULT CHARSET=UTF8'
    try:
        sqlMg.create(sql)
    except Exception, e:
        raise DarkException, _(
            'Create detectInfo table failed! Please check it! Exception: %s' %
            e)
Esempio n. 2
0
def create_whitelist_table():
    sql = 'create table whitelist(wlId INT AUTO_INCREMENT PRIMARY KEY, domain VARCHAR(100) NOT NULL UNIQUE, domainTitle VARCHAR(80)) DEFAULT CHARSET=UTF8'
    try:
        sqlMg.create(sql)
    except Exception, e:
        raise DarkException, _(
            'Create whitelist table failed! Please check it! Exception: %s' %
            e)
Esempio n. 3
0
def create_blacklist_table():
    sql = 'create table blacklist(blId INT AUTO_INCREMENT PRIMARY KEY, keyword VARCHAR(5) NOT NULL) DEFAULT CHARSET=UTF8'
    try:
        sqlMg.create(sql)
    except Exception, e:
        raise DarkException, _(
            'Create blacklist table failed! Please check it! Exception: %s' %
            e)
Esempio n. 4
0
def create_detect_info_table():
    sql = 'create table detectInfo(dtId INT AUTO_INCREMENT PRIMARY KEY, url VARCHAR(100) NOT NULL, hiddenUrl VARCHAR(500), hiddenContent VARCHAR(50), hiddenLevel VARCHAR(10), hiddenType VARCHAR(25)) DEFAULT CHARSET=UTF8'
    try:
        sqlMg.create(sql)
    except Exception, e:
        raise DarkException, _('Create detectInfo table failed! Please check it! Exception: %s' % e)
Esempio n. 5
0
def create_whitelist_table():
    sql = 'create table whitelist(wlId INT AUTO_INCREMENT PRIMARY KEY, domain VARCHAR(100) NOT NULL UNIQUE, domainTitle VARCHAR(80)) DEFAULT CHARSET=UTF8'
    try:
        sqlMg.create(sql)
    except Exception, e:
        raise DarkException, _('Create whitelist table failed! Please check it! Exception: %s' % e)
Esempio n. 6
0
def create_blacklist_table():
    sql = 'create table blacklist(blId INT AUTO_INCREMENT PRIMARY KEY, keyword VARCHAR(5) NOT NULL) DEFAULT CHARSET=UTF8'
    try:
        sqlMg.create(sql)
    except Exception, e:
        raise DarkException, _('Create blacklist table failed! Please check it! Exception: %s' % e)