CONTRIBUTING.md, doc: add details for local development

Instructions are added for how to install golang-migrate. Additional context is added for how to populate the local database, and run the frontend and worker servers.

Updates b/157994345

Change-Id: I937fd77da5894c01f2c380cc94055fa786a448ce
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/760281
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Miguel Acero 2020-06-02 14:03:15 -04:00
Родитель 5d82fbe1c8
Коммит eeabbb31ec
2 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -39,7 +39,11 @@ Before you begin working on an issue, please leave a comment that you are claimi
wish to set up a similar environment, you will want to
download and install the Google Cloud SDK at https://cloud.google.com/sdk/docs/.
4. Depending on the feature you are working on, review the contributing guides for:
4. If you are planning to develop any feature that involves the database, you will need
to [set up](doc/postgres.md) and [populate](doc/worker.md#populating-data-locally-using-the-worker) your local database. To run
the frontend and server servers locally, see the documentation for the [frontend server](doc/frontend.md) and [worker server](doc/worker.md).
5. Depending on the feature you are working on, review the contributing guides for:
- [Frontend development](doc/frontend.md)
- [Worker development](doc/worker.md)

Просмотреть файл

@ -76,6 +76,10 @@ Migrations are managed using
[github.com/golang-migrate/migrate](https://github.com/golang-migrate/migrate), with the
[CLI tool](https://github.com/golang-migrate/migrate/tree/master/cli).
If this is your first time using golang-migrate, check out the [Getting Started guide](https://github.com/golang-migrate/migrate/blob/master/GETTING_STARTED.md).
To install the golang-migrate CLI, follow the instructions in the [migrate CLI README](https://github.com/golang-migrate/migrate/blob/master/cmd/migrate/README.md).
### Creating a migration
To create a new migration:
@ -104,4 +108,6 @@ Use the `migrate` CLI:
devtools/migrate_db.sh [up|down|force|version] {#}
```
If you are migrating for the first time, choose the "up" command.
For additional details, see [golang-migrate/migrate/GETTING_STARTED.md#run-migrations](https://github.com/golang-migrate/migrate/blob/master/GETTING_STARTED.md#run-migrations).