non unique twt accounts
This commit is contained in:
parent
895df4998e
commit
48fc3fc954
@ -20,7 +20,9 @@ def create_app():
|
|||||||
twitter_db.init_app(app)
|
twitter_db.init_app(app)
|
||||||
campaign_db.init_app(app)
|
campaign_db.init_app(app)
|
||||||
|
|
||||||
|
twitter_db.drop_all(app=app)
|
||||||
twitter_db.create_all(app=app)
|
twitter_db.create_all(app=app)
|
||||||
|
campaign_db.drop_all(app=app)
|
||||||
campaign_db.create_all(app=app)
|
campaign_db.create_all(app=app)
|
||||||
|
|
||||||
app.register_blueprint(twitter, url_prefix='/twitter')
|
app.register_blueprint(twitter, url_prefix='/twitter')
|
||||||
|
@ -8,7 +8,7 @@ class TwitterAccount(twitter_db.Model):
|
|||||||
|
|
||||||
account_id = twitter_db.Column(twitter_db.Integer, primary_key=True)
|
account_id = twitter_db.Column(twitter_db.Integer, primary_key=True)
|
||||||
user_id = twitter_db.Column(twitter_db.String(64), nullable=False)
|
user_id = twitter_db.Column(twitter_db.String(64), nullable=False)
|
||||||
twitter_account_id = twitter_db.Column(twitter_db.String(32), unique=True, nullable=False)
|
twitter_account_id = twitter_db.Column(twitter_db.String(32), nullable=False)
|
||||||
username = twitter_db.Column(twitter_db.String(16), unique=True, nullable=False)
|
username = twitter_db.Column(twitter_db.String(16), nullable=False)
|
||||||
access_token = twitter_db.Column(twitter_db.String(256), nullable=False)
|
access_token = twitter_db.Column(twitter_db.String(256), nullable=False)
|
||||||
access_token_secret = twitter_db.Column(twitter_db.String(256), nullable=False)
|
access_token_secret = twitter_db.Column(twitter_db.String(256), nullable=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user