File size: 399 Bytes
6ea020b
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import os
from sqlmodel import SQLModel, create_engine
import models # Make sure models are imported so SQLModel knows about them

# Create sqlite engine pointing to lab_system database
sqlite_url = "sqlite:///./lab_database.db"
engine = create_engine(sqlite_url, echo=True)

if __name__ == "__main__":
    print("Creating new tables...")
    SQLModel.metadata.create_all(engine)
    print("Done!")