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
Copy file name to clipboardExpand all lines: .github/pull_request_template.md
+1-14Lines changed: 1 addition & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,37 +2,26 @@
2
2
3
3
<!-- Your title should be able to summarize what changes you've made in one sentence. For example: "Exclude staff from the check for follows". For stacked PRs, please indicate clearly in the title where in the stack you are. For example: "[Eatery Refactor][4/5] Converted all files to MVP model" -->
4
4
5
-
6
5
## Overview
7
6
8
7
<!-- Summarize your changes here. -->
9
8
10
-
11
-
12
9
## Changes Made
13
10
14
11
<!-- Include details of what your changes actually are and how it is intended to work. -->
15
12
16
-
17
-
18
13
## Test Coverage
19
14
20
15
<!-- Describe how you tested this feature. Manual testing and/or unit testing. Please include repro steps and/or how to turn the feature on if applicable. -->
21
16
22
-
23
-
24
17
## Next Steps (delete if not applicable)
25
18
26
19
<!-- If this is part of a multi-PR change, please describe what changes you plan on addressing in future PRs. -->
27
20
28
-
29
-
30
21
## Related PRs or Issues (delete if not applicable)
31
22
32
23
<!-- List related PRs against other branches/repositories. -->
33
24
34
-
35
-
36
25
## Screenshots (delete if not applicable)
37
26
38
27
<!-- This could include of screenshots of the new feature / proof that the changes work. -->
@@ -41,8 +30,6 @@
41
30
42
31
<summary>Screen Shot Name</summary>
43
32
44
-
45
33
<!-- Insert file link here. Newlines above and below your link are necessary for this to work. -->
If you are encountering any migrations errors, use this as a last resort!
180
190
181
191
1. Log into psql and run
182
-
```
183
-
drop database "resell-dev"
184
-
```
185
-
This will delete all data in your database as well. Make sure you do not have any important data in your database.
192
+
193
+
```
194
+
drop database "resell-dev"
195
+
```
196
+
197
+
This will delete all data in your database as well. Make sure you do not have any important data in your database.
186
198
187
199
2. Create the database again via.
188
-
```
189
-
create database "resell-dev"
190
-
```
200
+
201
+
```
202
+
create database "resell-dev"
203
+
```
191
204
192
205
3. Delete all of the migration files in the "migrations" folder
193
206
194
207
4. Create a new migration file titled "init" via.
195
-
```
196
-
npm run db:migrate:generate init
197
-
```
208
+
209
+
```
210
+
npm run db:migrate:generate init
211
+
```
198
212
199
213
5. Run the migration
200
-
```
201
-
npm run db:migrate
202
-
```
214
+
```
215
+
npm run db:migrate
216
+
```
203
217
204
218
---
205
219
@@ -237,7 +251,6 @@ Before you can dump from the remote dev server, you need to configure the connec
237
251
- Database name
238
252
- Username
239
253
- Password
240
-
241
254
6. **Configure SSL Settings**
242
255
- Go to the **Parameters** tab
243
256
- Find `sslmode` and set it to **required**
@@ -255,6 +268,7 @@ Before you can dump from the remote dev server, you need to configure the connec
255
268
**Option A: Dump from Remote Server (Recommended)**
256
269
257
270
Once you have the remote dev server configured in pgAdmin (see Step 0), use those connection details to dump:
271
+
258
272
```bash
259
273
REMOTE_DB_HOST=your-dev-server-host \
260
274
REMOTE_DB_PORT=your-port \
@@ -270,6 +284,7 @@ Replace the values with your actual DigitalOcean connection details from pgAdmin
270
284
**Option B: Dump from Local Database**
271
285
272
286
If your dev database is local, simply run:
287
+
273
288
```bash
274
289
./scripts/dump-dev-db.sh
275
290
```
@@ -279,42 +294,49 @@ This automatically detects your Docker container or native postgres installation
279
294
#### Step 2: Import into Local resell-dev Database
280
295
281
296
The import script automatically detects your postgres setup (Docker or native) and imports accordingly:
297
+
282
298
```bash
283
299
./scripts/import-dev-data.sh
284
300
```
301
+
285
302
**WARNING: This will replace all data in your local resell-dev database!** You'll be prompted to confirm.
286
303
287
304
**What these commands do:**
288
305
289
306
The first command (dump):
307
+
290
308
- Connects to the **remote DigitalOcean hosted dev database** (appdev-postgres)
291
309
- Reads the `resell-dev` database from DigitalOcean (READ ONLY - no changes to remote!)
292
310
- Saves a copy to `dumps/dev_db_dump_[timestamp].sql` on your machine
293
311
294
312
The second command (import):
313
+
295
314
- Finds the dump file you just created
296
315
- Imports it into your **local `resell-dev`** database (in postgres-docker)
297
316
- Shows a summary of imported tables and row counts
298
317
299
318
**Important Note:** Both the remote DigitalOcean database and your local database are named `resell-dev`, but they are completely SEPARATE. The dump script only reads from DigitalOcean and never modifies it.
300
319
301
320
**Manual Override Options:**
321
+
302
322
- Force Docker: `FORCE_DOCKER=1 ./scripts/import-dev-data.sh`
303
323
- Force Native: `FORCE_NATIVE=1 ./scripts/import-dev-data.sh`
0 commit comments