0

I've a mysql db I usually run queries against using SQLAlchemy but not the ORM. The tables are NOT defined as SQLAlchemy models. I'm trying to replicate the db elsewhere and need the table metadata. Is there a way in SQLAlchemy I can generate the create sql statement for pre-existing tables or even just get the column names and data types?

Judy T Raj
  • 1,755
  • 3
  • 27
  • 41
  • check out https://stackoverflow.com/questions/706664/generate-sql-create-scripts-for-existing-tables-with-query maybe https://stackoverflow.com/questions/2593803/how-to-generate-the-create-table-sql-statement-for-an-existing-table-in-postgr – JonSG Apr 28 '23 at 13:51

0 Answers0