Skip to content

Commit 39a6cfb

Browse files
authored
add documentation for migration command system (#652)
# Purpose Added documentation and usage to the POSTGRESQL_SETUP.md file as well as the migration script. This was for clarity and posterity purposes. # New Changes - Documentation # Outstanding Changes If there are non-critical changes (i.e. additional features) that can be made to this feature in the future, indicate them here. Add telemetry migration to the command system in the future
1 parent 8ee187d commit 39a6cfb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
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` or `commands` as command arguments to migrate those respective datasets individually.
73+
7074
**[Back to top](#table-of-contents)**
7175

7276
## Sources

gs/backend/migrate.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
from gs.backend.data.database.engine import get_db_session
44
from gs.backend.data.resources.utils import add_callsigns, add_main_commands
55

6+
"""
7+
To migrate pre-determined datainto your local database,
8+
you can run `python3 gs/backend/migrate.py` from the top
9+
level directory.
10+
11+
Alternatively, you can include `callsigns` or `commands`
12+
as command arguments to migrate those respective datasets
13+
individually.
14+
"""
15+
616
if __name__ == "__main__":
717
if len(sys.argv) > 2:
818
raise ValueError(f"Invalid input. Expected at most 1 argument, received {len(sys.argv)}")

0 commit comments

Comments
 (0)