You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The unit tests for this repo require a local PostgreSQL database. You can run a
170
166
local DB server or create a docker container using the provided test compose
@@ -187,21 +183,21 @@ Run the tests (pre-test hook runs DB migrations):
187
183
npm test
188
184
```
189
185
190
-
# Creating a new database migration
186
+
##Creating a new database migration
191
187
If you need to migrate the database, you can create a new migration via `knex`, which will create the migration file for you based in part on the migration name you provide. From the root of this repo, run:
192
188
```
193
189
`npm bin`/knex migrate:make <the name of your migration>
194
190
```
195
191
196
192
See [knex documentation](https://knexjs.org/#Installation-migrations) for more details.
197
193
198
-
# Running database migrations
194
+
##Running database migrations
199
195
200
-
## Locally
196
+
###Locally
201
197
202
198
`npm run migrate`
203
199
204
-
## In production
200
+
###In production
205
201
206
202
In production, you can run database migrations via `cf run-task`. As with anything in production, be careful when doing this! First, try checking the current status of migrations using the `migrate:status` command
0 commit comments