fdsfs
This commit is contained in:
parent
dd760bd932
commit
fd12fa2447
2 changed files with 7 additions and 7 deletions
|
@ -2,7 +2,7 @@ import re
|
|||
from urllib.parse import urlencode, urlparse, parse_qs
|
||||
from flask import *
|
||||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import relationship, deferred
|
||||
from files.helpers.lazy import lazy
|
||||
from files.helpers.const import SLURS
|
||||
from files.__main__ import Base
|
||||
|
@ -18,8 +18,8 @@ class CommentAux(Base):
|
|||
|
||||
key_id = Column(Integer, primary_key=True)
|
||||
id = Column(Integer, ForeignKey("comments.id"))
|
||||
body = Column(String(10000))
|
||||
body_html = Column(String(20000))
|
||||
body = deferred(Column(String(10000)))
|
||||
body_html = deferred(Column(String(20000)))
|
||||
ban_reason = Column(String(256), default='')
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ class Comment(Base):
|
|||
__tablename__ = "comments"
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
comment_aux = relationship("CommentAux", lazy="joined", uselist=False, innerjoin=True, primaryjoin="Comment.id==CommentAux.id")
|
||||
comment_aux = relationship("CommentAux", uselist=False, primaryjoin="Comment.id==CommentAux.id")
|
||||
author_id = Column(Integer, ForeignKey("users.id"))
|
||||
parent_submission = Column(Integer, ForeignKey("submissions.id"))
|
||||
created_utc = Column(Integer, default=0)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from flask import render_template, g
|
||||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import relationship, deferred
|
||||
import re, random
|
||||
from urllib.parse import urlparse
|
||||
from files.helpers.lazy import lazy
|
||||
|
@ -22,8 +22,8 @@ class SubmissionAux(Base):
|
|||
title = Column(String(500))
|
||||
title_html = Column(String(500))
|
||||
url = Column(String(500))
|
||||
body = Column(String(10000))
|
||||
body_html = Column(String(20000))
|
||||
body = deferred(Column(String(10000)))
|
||||
body_html = deferred(Column(String(20000)))
|
||||
ban_reason = Column(String(128))
|
||||
embed_url = Column(String(256))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue