twitter #2

Merged
s434708 merged 50 commits from twitter into master 2022-06-09 19:42:33 +02:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 74b2cd9d91 - Show all commits

View File

@ -2,6 +2,7 @@ from flask_sqlalchemy import SQLAlchemy
campaign_db = SQLAlchemy() campaign_db = SQLAlchemy()
class TwitterAccount(campaign_db.Model): class TwitterCampaign(campaign_db.Model):
# fields here __tablename__ = 'twitter_campaign'
pass
campaign_id = campaign_db.Column(campaign_db.Integer, primary_key=True, nullable=False)

View File

@ -6,7 +6,7 @@ twitter_db = SQLAlchemy()
class TwitterAccount(twitter_db.Model): class TwitterAccount(twitter_db.Model):
__tablename__ = 'twitter_account' __tablename__ = 'twitter_account'
account_id = twitter_db.Column(twitter_db.Integer, primary_key=True) account_id = twitter_db.Column(twitter_db.Integer, primary_key=True, nullable=False)
twitter_user_id = twitter_db.Column(twitter_db.String(16), unique=True, nullable=False) twitter_user_id = twitter_db.Column(twitter_db.String(16), unique=True, nullable=False)
username = twitter_db.Column(twitter_db.String(16), unique=True, nullable=False) username = twitter_db.Column(twitter_db.String(16), unique=True, nullable=False)
access_token = twitter_db.Column(twitter_db.String(256), nullable=False) access_token = twitter_db.Column(twitter_db.String(256), nullable=False)