P
P
pcdesign2015-01-07 16:26:18
MySQL
pcdesign, 2015-01-07 16:26:18

How to transfer data from MySQL shema to class for use in flask sqlalchemy?

There is a mysql database. It contains hundreds of tables and fields.
Do not manually write a description for each table and field, in the form:

class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(80), unique=True)
    email = db.Column(db.String(120), unique=True)


Maybe there is some converter that would interrogate all the tables and fields in the database,
and then present it as classes, as in the example?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xSkyFoXx, 2015-01-07
@pcdesign

Your question is very closely related to stackoverflow.com/questions/1425412/reverse-engine...
Use sqlautocode .

R
Rostislav Grigoriev, 2015-01-07
@crazyzubr

IMHO, you need to write such a script yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question