Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gs/POSTGRESQL_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ Note: You can choose to remove the first to lines of the `.env` that start with

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.

To migrate pre-determined datainto your local database, you can run `python3 gs/backend/migrate.py` from the top level directory.

Alternatively, you can include `callsigns` or `commands` as command arguments to migrate those respective datasets individually.

**[Back to top](#table-of-contents)**

## Sources
Expand Down
10 changes: 10 additions & 0 deletions gs/backend/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
from gs.backend.data.database.engine import get_db_session
from gs.backend.data.resources.utils import add_callsigns, add_main_commands

"""
To migrate pre-determined datainto your local database,
you can run `python3 gs/backend/migrate.py` from the top
level directory.

Alternatively, you can include `callsigns` or `commands`
as command arguments to migrate those respective datasets
individually.
"""

if __name__ == "__main__":
if len(sys.argv) > 2:
raise ValueError(f"Invalid input. Expected at most 1 argument, received {len(sys.argv)}")
Expand Down
Loading