Skip to content

Commit

Permalink
Update CONTRIB.md
Browse files Browse the repository at this point in the history
  • Loading branch information
michplunkett committed Jul 23, 2024
1 parent 89a3bec commit 918659b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CONTRIB.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,14 @@ From here on out, we'll be using the Flask CLI. First we need to 'stamp' the cur
```shell
$ docker exec -it openoversight-web-1 bash # 'openoversight-web-1' is the name of the app container seen in the step above
$ flask db stamp head
$ flask db migrate -m "[THE NAME OF YOUR MIGRATION IN ALL LOWER CASE]" # NOTE: Slugs are limited to 40 characters and will be truncated after the limit
```

(Hint: If you get errors when running `flask` commands, e.g. because of differing Python versions, you may need to run the commands in the docker container by prefacing them as so: `docker exec -it openoversight_web_1 flask db stamp head`)

Next make your changes to the database models in `OpenOversight/app/models/database.py`. You'll then generate the migrations:

```shell
$ flask db migrate -m "[THE NAME OF YOUR MIGRATION IN ALL LOWER CASE]"
$ flask db migrate -m "[THE NAME OF YOUR MIGRATION IN ALL LOWER CASE]" # NOTE: Slugs are limited to 40 characters and will be truncated after the limit
```

And then you should inspect/edit the migrations. You can then apply the migrations:
Expand Down

0 comments on commit 918659b

Please sign in to comment.