core integration fix db 2

This commit is contained in:
Łukasz Jędyk 2022-01-25 14:40:43 +01:00
parent 315292f0e8
commit aeb87ec272
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ def create_app():
campaign_db.init_app(app)
twitter_db.create_all(app=app)
campaign_db.drop_all(app=app)
campaign_db.create_all(app=app)
app.register_blueprint(twitter, url_prefix='/twitter')

View File

@ -7,7 +7,7 @@ class TwitterCampaign(campaign_db.Model):
campaign_id = campaign_db.Column(campaign_db.Integer, primary_key=True)
campaign_name = campaign_db.Column(campaign_db.String(64), nullable=False)
twitter_account_id = campaign_db.Column(campaign_db.String(32), unique=True, nullable=False)
twitter_account_id = campaign_db.Column(campaign_db.String(32), nullable=False)
user_input = campaign_db.Column(campaign_db.String(100), nullable=False)
generated_content = campaign_db.Column(campaign_db.String(300), nullable=False)
twitter_post_id = campaign_db.Column(campaign_db.String(32), unique=True, nullable=False)