Skip to content

Commit 9147f08

Browse files
committed
add scheduler db schema
1 parent 3623268 commit 9147f08

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PYTHONUNBUFFERED=1
55
POSTGRES_HOST=db
66
POSTGRES_PORT=5432
77
POSTGRES_DB=devdb
8-
POSTGRES_USER=user
8+
POSTGRES_USER=devdb
99
POSTGRES_PASSWORD=secret
1010

1111
# Redis

app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async def lifespan(_app: FastAPI):
6767
dependencies=[Depends(AuthBearer())],
6868
)
6969

70-
_scheduler_data_store = SQLAlchemyDataStore(engine)
70+
_scheduler_data_store = SQLAlchemyDataStore(engine, schema="scheduler")
7171
_scheduler_event_broker = RedisEventBroker(
7272
client_or_url=global_settings.redis_url.unicode_string()
7373
)

db/create.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
-- DROP DATABASE IF EXISTS devdb;
2-
-- CREATE DATABASE devdb;
31
\connect devdb;
42
CREATE SCHEMA shakespeare;
53
CREATE SCHEMA happy_hog;
4+
CREATE SCHEMA scheduler;
65

76
DROP DATABASE IF EXISTS testdb;
87
CREATE DATABASE testdb;
98
\connect testdb;
109
CREATE SCHEMA shakespeare;
1110
CREATE SCHEMA happy_hog;
11+
CREATE SCHEMA scheduler;

0 commit comments

Comments
 (0)