I have an app engine project and I want to use MySQL instance (google cloud platform) to store my datas.
I can connect to my instance by using this tuto.
So now I want to know how to create a model like :
app = Flask(__name__)
db = SQLAlchemy(app)
class Visit(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime())
user_ip = db.Column(db.String(46))
def __init__(self, timestamp, user_ip):
self.timestamp = timestamp
self.user_ip = user_ip
And add it in my instance, and if I add a field in my model how to update it with my instance.