예제 #1
0
파일: utils.py 프로젝트: matoous/newz
def create_tables():
    User.create_table()
    Feed.create_table()
    Link.create_table()
    Ban.create_table()
    Comment.create_table()
    FeedAdmin.create_table()
    Report.create_table()
    create_subscriptions_table()
    DisposableToken.create_table()
    CommentVote.create_table()
    LinkVote.create_table()
예제 #2
0
파일: db.py 프로젝트: matoous/newz
def create_tables(app):
    with app.app_context():
        from news.models.disposable_token import DisposableToken

        DisposableToken.create_table()

        from news.models.feed import Feed

        Feed.create_table()

        from news.models.user import User

        User.create_table()

        from news.models.link import Link

        Link.create_table()

        from news.models.vote import LinkVote

        LinkVote.create_table()

        from news.models.comment import Comment

        Comment.create_table()

        from news.models.vote import CommentVote

        CommentVote.create_table()

        from news.models.subscriptions import create_subscriptions_table

        create_subscriptions_table()

        from news.models.feed_admin import FeedAdmin

        FeedAdmin.create_table()

        from news.models.report import Report

        Report.create_table()

        from news.models.link import SavedLink

        SavedLink.create_table()

        from news.models.ban import Ban

        Ban.create_table()