remove email column
This commit is contained in:
parent
59706815e7
commit
11c6e4d720
@ -76,7 +76,7 @@ class SQLite(Abstract):
|
||||
|
||||
fields = [
|
||||
'path', 'id', 'created', 'modified',
|
||||
'text', 'author', 'email', 'website', 'parent', 'mode'
|
||||
'text', 'author', 'hash', 'website', 'parent', 'mode'
|
||||
]
|
||||
|
||||
def __init__(self, dbpath, moderation):
|
||||
@ -87,8 +87,9 @@ class SQLite(Abstract):
|
||||
with sqlite3.connect(self.dbpath) as con:
|
||||
sql = ('main.comments (path VARCHAR(255) NOT NULL, id INTEGER NOT NULL,'
|
||||
'created FLOAT NOT NULL, modified FLOAT, text VARCHAR,'
|
||||
'author VARCHAR(64), email VARCHAR(64), website VARCHAR(64),'
|
||||
'parent INTEGER, mode INTEGER, hash CHAR(32), PRIMARY KEY (id, path))')
|
||||
'author VARCHAR(64), hash VARCHAR(32), website VARCHAR(64),'
|
||||
'parent INTEGER, mode INTEGER,'
|
||||
'PRIMARY KEY (id, path))')
|
||||
con.execute("CREATE TABLE IF NOT EXISTS %s;" % sql)
|
||||
|
||||
# increment id if (id, path) is no longer unique
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
import os
|
||||
import json
|
||||
import urllib
|
||||
import tempfile
|
||||
@ -35,6 +36,9 @@ class TestComments(unittest.TestCase):
|
||||
self.post = self.client.post
|
||||
self.delete = self.client.delete
|
||||
|
||||
def tearDown(self):
|
||||
os.unlink(self.path)
|
||||
|
||||
def testGet(self):
|
||||
|
||||
self.post('/new?uri=%2Fpath%2F', data=json.dumps({'text': 'Lorem ipsum ...'}))
|
||||
|
Loading…
Reference in New Issue
Block a user