|
@@ -9,13 +9,6 @@ def createDb(app):
|
|
|
db = SQLAlchemy(app)
|
|
|
|
|
|
# Create the tables
|
|
|
- class User(UserMixin, db.Model):
|
|
|
- id = db.Column(db.Integer, primary_key=True)
|
|
|
- username = db.Column(db.Text, unique=True)
|
|
|
- password = db.Column(db.Text)
|
|
|
- def __init__(self, username, password):
|
|
|
- self.username = username
|
|
|
- self.password = password
|
|
|
class Topic(db.Model):
|
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
|
title = db.Column(db.Text)
|
|
@@ -86,7 +79,6 @@ def createDb(app):
|
|
|
l.append(username)
|
|
|
self.likesNum += 1
|
|
|
self.likes = json.dumps(l)
|
|
|
- db.create_all()
|
|
|
|
|
|
# Return the data
|
|
|
- return {'db': db, 'User': User, 'Topic': Topic, 'Reply': Reply}
|
|
|
+ return {'db': db, 'Topic': Topic, 'Reply': Reply}
|