Skip to content

Commit 68f9a14

Browse files
authored
Merge branch 'main' into erin/ina230
2 parents 67e1a23 + e3a8c43 commit 68f9a14

15 files changed

+91156
-90910
lines changed

gs/POSTGRESQL_SETUP.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Note: You can choose to remove the first to lines of the `.env` that start with
6767

6868
Now, you can start the backend as by running `fastapi dev gs/backend/main.py` from the top level directory to run in development mode.
6969

70+
To migrate pre-determined datainto your local database, you can run `python3 gs/backend/migrate.py` from the top level directory.
71+
72+
Alternatively, you can include `callsigns`, `commands`, or `telemetries` as command arguments to migrate those respective datasets individually.
73+
7074
**[Back to top](#table-of-contents)**
7175

7276
## Sources

gs/backend/api/lifespan.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from fastapi_cache.backends.inmemory import InMemoryBackend
77

88
from gs.backend.data.database.engine import get_db_session, setup_database
9-
from gs.backend.data.resources.utils import add_callsigns, add_main_commands
109

1110

1211
@asynccontextmanager
@@ -18,6 +17,4 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]:
1817
# Must all the get_db_session each time when pass it into a separate function.
1918
# Otherwise, will get transaction is inactive error
2019
setup_database(get_db_session())
21-
add_main_commands(get_db_session())
22-
add_callsigns(get_db_session())
2320
yield

0 commit comments

Comments
 (0)