From 129f0f3e71f2447557672c1b74d78e8463b9d6d4 Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 11 Feb 2021 18:50:29 +0100 Subject: [PATCH] Create database tables --- database/__init__.py | 1 + shell.nix | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/database/__init__.py b/database/__init__.py index c33457d..e113f1c 100644 --- a/database/__init__.py +++ b/database/__init__.py @@ -7,3 +7,4 @@ from constants import TESTING_DB as DB engine = create_engine(DB, connect_args={"check_same_thread": False}) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() +Base.metadata.create_all(bind=engine) diff --git a/shell.nix b/shell.nix index 01138fa..93bb6cc 100644 --- a/shell.nix +++ b/shell.nix @@ -22,7 +22,6 @@ in mkShell { pg_ctl start -o "--unix_socket_directories=${data_dir} --listen_addresses='''" fi - psql -d postgres -f ${sql_file} alias psql='psql -d postgres' ''; }