def create_table(): if not User.exists(): app.logger.debug('Creating DynamoDB User table..') User.create_table(read_capacity_units=app.config['DDB_RCU'], write_capacity_units=app.config['DDB_WCU'], wait=True) if not Photo.exists(): app.logger.debug('Creating DynamoDB Photo table..') Photo.create_table(read_capacity_units=app.config['DDB_RCU'], write_capacity_units=app.config['DDB_WCU'], wait=True)
def create_table(): User.create_table() Photo.create_table() app.logger.debug("Dynamodb Users & Photos table created")
from cloudalbum.database.model_ddb import Photo from flask import current_app as app if not Photo.exists(): Photo.create_table(read_capacity_units=app.config['DDB_RCU'], write_capacity_units=app.config['DDB_WCU'], wait=True) app.logger.debug('DynamoDB Photo table created!') def create_table(): Photo.create_table() app.logger.debug("Dynamodb Photos table created") def delete_table(): Photo.delete_table() app.logger.debug("Dynamodb Users table deleted")
def create_table(): Photo.create_table() app.logger.debug("Dynamodb Photos table created")
def create_table(): Photo.create_table() print("Dynamodb Photos table created") pass