tests: ensure helper function actually updates database schema
This commit is contained in:
parent
aba919adca
commit
aecd10115e
3 changed files with 18 additions and 4 deletions
|
|
@ -6,5 +6,5 @@ sqlite_url = os.environ.get("DATABASE_URL", "sqlite:///database.db")
|
|||
engine = create_engine(sqlite_url, echo=False)
|
||||
|
||||
|
||||
def create_db_and_tables():
|
||||
def create_db_and_tables(engine):
|
||||
SQLModel.metadata.create_all(engine)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ TEILCHEN_DATA_HEADER = "pk Name Description Number Tags".split()
|
|||
|
||||
class SammlerApp(App):
|
||||
async def on_mount(self) -> None:
|
||||
create_db_and_tables()
|
||||
create_db_and_tables(engine)
|
||||
self.push_screen(AddInventoryScreen())
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue