-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Database | ||
|
||
|
||
It's expected that you'll set up a DB separately from the app. The app uses a proxy | ||
container to enable it to talk to an external DB through the hostname `db`. | ||
|
||
|
||
## Data model | ||
|
||
The data model is managed by SQLAlchemy. The model is at | ||
`usaon-vta-survey/models/tables.py` | ||
|
||
|
||
### Changes to the data model | ||
|
||
We haven't started working on data migrations yet. | ||
|
||
For now, it's expected that the database will be re-initialized completely to apply | ||
changes. | ||
|
||
To do that: | ||
|
||
``` | ||
./scripts/invoke_in_container.sh db.init | ||
``` | ||
|
||
> :warning: Don't forget to set USAON_VTA_SURVEY_VERSION envvar to match the running | ||
> container (`source VERSION.env`), or a new container will be pulled. |