summaryrefslogtreecommitdiff
path: root/sphinx/websupport/storage
diff options
context:
space:
mode:
authorJacob Mason <jacoblmason@gmail.com>2010-08-14 17:59:31 -0500
committerJacob Mason <jacoblmason@gmail.com>2010-08-14 17:59:31 -0500
commita52fd809bf0eecefc1b5aba3c05d6d56a1f66538 (patch)
tree9a0f04309e30955d74374d7056ee67afdcda9f6e /sphinx/websupport/storage
parentf94df908bcc73701d96de8b99ff5d034d6186ba6 (diff)
downloadsphinx-git-a52fd809bf0eecefc1b5aba3c05d6d56a1f66538.tar.gz
remove line column from node table
Diffstat (limited to 'sphinx/websupport/storage')
-rw-r--r--sphinx/websupport/storage/__init__.py6
-rw-r--r--sphinx/websupport/storage/db.py4
-rw-r--r--sphinx/websupport/storage/sqlalchemystorage.py4
3 files changed, 4 insertions, 10 deletions
diff --git a/sphinx/websupport/storage/__init__.py b/sphinx/websupport/storage/__init__.py
index da815d0a3..6a5ff49b1 100644
--- a/sphinx/websupport/storage/__init__.py
+++ b/sphinx/websupport/storage/__init__.py
@@ -16,15 +16,11 @@ class StorageBackend(object):
"""
pass
- def add_node(self, id, document, line, source):
+ def add_node(self, id, document, source):
"""Add a node to the StorageBackend.
:param id: a unique id for the comment.
-
:param document: the name of the document the node belongs to.
-
- :param line: the line in the source where the node begins.
-
:param source: the source files name.
"""
raise NotImplementedError()
diff --git a/sphinx/websupport/storage/db.py b/sphinx/websupport/storage/db.py
index 54b16f225..be81a3334 100644
--- a/sphinx/websupport/storage/db.py
+++ b/sphinx/websupport/storage/db.py
@@ -31,7 +31,6 @@ class Node(Base):
id = Column(String(32), primary_key=True)
document = Column(String(256), nullable=False)
- line = Column(Integer)
source = Column(Text, nullable=False)
def nested_comments(self, username, moderator):
@@ -94,10 +93,9 @@ class Node(Base):
return comments
- def __init__(self, id, document, line, source):
+ def __init__(self, id, document, source):
self.id = id
self.document = document
- self.line = line
self.source = source
class Comment(Base):
diff --git a/sphinx/websupport/storage/sqlalchemystorage.py b/sphinx/websupport/storage/sqlalchemystorage.py
index d1683f603..174bef6e5 100644
--- a/sphinx/websupport/storage/sqlalchemystorage.py
+++ b/sphinx/websupport/storage/sqlalchemystorage.py
@@ -33,8 +33,8 @@ class SQLAlchemyStorage(StorageBackend):
def pre_build(self):
self.build_session = Session()
- def add_node(self, id, document, line, source):
- node = Node(id, document, line, source)
+ def add_node(self, id, document, source):
+ node = Node(id, document, source)
self.build_session.add(node)
self.build_session.flush()
return node