Update database.py
Browse files- database.py +1 -1
database.py
CHANGED
@@ -12,7 +12,7 @@ engine = create_engine(DATABASE_URL)
|
|
12 |
|
13 |
|
14 |
# Create the tables defined in your models.
|
15 |
-
Base.metadata.create_all(bind=engine)
|
16 |
|
17 |
# You can remove the 'SessionLocal' setup if you're using FastAPI's Dependency system.
|
18 |
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
|
|
12 |
|
13 |
|
14 |
# Create the tables defined in your models.
|
15 |
+
Base.metadata.create_all(bind=engine, checkfirst=True)
|
16 |
|
17 |
# You can remove the 'SessionLocal' setup if you're using FastAPI's Dependency system.
|
18 |
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|