Create database tables
This commit is contained in:
parent
90eaf097bb
commit
129f0f3e71
|
@ -7,3 +7,4 @@ from constants import TESTING_DB as DB
|
||||||
engine = create_engine(DB, connect_args={"check_same_thread": False})
|
engine = create_engine(DB, connect_args={"check_same_thread": False})
|
||||||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||||
Base = declarative_base()
|
Base = declarative_base()
|
||||||
|
Base.metadata.create_all(bind=engine)
|
||||||
|
|
|
@ -22,7 +22,6 @@ in mkShell {
|
||||||
pg_ctl start -o "--unix_socket_directories=${data_dir} --listen_addresses='''"
|
pg_ctl start -o "--unix_socket_directories=${data_dir} --listen_addresses='''"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
psql -d postgres -f ${sql_file}
|
|
||||||
alias psql='psql -d postgres'
|
alias psql='psql -d postgres'
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue