nighthawkcoders / flask_2025

This project is a web application for managing Classroom instruction and operations. It is built using Flask, SQLAlchemy, and other requirements.txt dependencies.
https://flask2025.nighthawkcodingsociety.com/
0 stars 12 forks source link

db_init.py to import schema into a NEW db #30

Closed tanishapatil1234 closed 3 months ago

tanishapatil1234 commented 3 months ago
image

NOTE : “SQLAlchemy 1.4 and later, the execute method was deprecated and removed from the Engine object. So I am using the Connection object to execute raw SQL queries.”

1) Ran new db_init.py

2) Observe new table , with specified tables. This script is easy because we can customize which tables to migrate, and which db to migrate from. Eventually I may have a global variable called "sql version" , so the file which connects to rds can utilize the correct version of sql.db (sql_v2.db versus sql_v3.db versus sql_v4.db , etc.)

image image image image