Skip to content

Commit 07e5557

Browse files
authored
Rename appuser -> dbuser in documentation (#216)
2 parents d41358a + d1771bb commit 07e5557

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,23 @@ unaffected by the iteration you've been applying to your development database
108108
Create your database role (if desired), database and shadow database:
109109

110110
```bash
111-
createuser --pwprompt appuser
112-
createdb myapp --owner=appuser
113-
createdb myapp_shadow --owner=appuser
111+
createuser --pwprompt dbowner
112+
createdb myapp --owner=dbowner
113+
createdb myapp_shadow --owner=dbowner
114114
```
115115

116+
> For an in depth-discussion on the different users and roles typically involved
117+
> in database and migration management, please see issue
118+
> [#215](https://github.com/graphile/migrate/issues/215).
119+
116120
Export your database URL, shadow database URL, and a "root" database URL which
117121
should be a superuser account connection to any **other** database (most
118122
PostgreSQL servers have a default database called `postgres` which is a good
119123
choice for this).
120124

121125
```bash
122-
export DATABASE_URL="postgres://appuser:password@localhost/myapp"
123-
export SHADOW_DATABASE_URL="postgres://appuser:password@localhost/myapp_shadow"
126+
export DATABASE_URL="postgres://dbowner:password@localhost/myapp"
127+
export SHADOW_DATABASE_URL="postgres://dbowner:password@localhost/myapp_shadow"
124128

125129
export ROOT_DATABASE_URL="postgres://postgres:postgres@localhost/postgres"
126130
```

__tests__/settings.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,12 @@ describe("gmrc path", () => {
320320
mockFs.restore();
321321
mockFs({
322322
[DEFAULT_GMRC_PATH]: `
323-
{ "connectionString": "postgres://appuser:apppassword@host:5432/defaultdb" }
323+
{ "connectionString": "postgres://dbowner:password@host:5432/defaultdb" }
324324
`,
325325
});
326326
const settings = await getSettings();
327327
expect(settings.connectionString).toEqual(
328-
"postgres://appuser:apppassword@host:5432/defaultdb",
328+
"postgres://dbowner:password@host:5432/defaultdb",
329329
);
330330
mockFs.restore();
331331
});
@@ -334,15 +334,15 @@ describe("gmrc path", () => {
334334
mockFs.restore();
335335
mockFs({
336336
[DEFAULT_GMRC_PATH]: `
337-
{ "connectionString": "postgres://appuser:apppassword@host:5432/defaultdb" }
337+
{ "connectionString": "postgres://dbowner:password@host:5432/defaultdb" }
338338
`,
339339
".other-gmrc": `
340-
{ "connectionString": "postgres://appuser:apppassword@host:5432/otherdb" }
340+
{ "connectionString": "postgres://dbowner:password@host:5432/otherdb" }
341341
`,
342342
});
343343
const settings = await getSettings({ configFile: ".other-gmrc" });
344344
expect(settings.connectionString).toEqual(
345-
"postgres://appuser:apppassword@host:5432/otherdb",
345+
"postgres://dbowner:password@host:5432/otherdb",
346346
);
347347
mockFs.restore();
348348
});
@@ -362,12 +362,12 @@ describe("gmrc from JS", () => {
362362
mockFs({
363363
[DEFAULT_GMRCJS_PATH]: /* JavaScript */ `\
364364
module.exports = {
365-
connectionString: "postgres://appuser:apppassword@host:5432/gmrcjs_test",
365+
connectionString: "postgres://dbowner:password@host:5432/gmrcjs_test",
366366
};`,
367367
});
368368
const settings = await getSettings();
369369
expect(settings.connectionString).toEqual(
370-
"postgres://appuser:apppassword@host:5432/gmrcjs_test",
370+
"postgres://dbowner:password@host:5432/gmrcjs_test",
371371
);
372372
mockFs.restore();
373373
});
@@ -382,12 +382,12 @@ module.exports = {
382382
mockFs({
383383
[DEFAULT_GMRC_COMMONJS_PATH]: /* JavaScript */ `\
384384
module.exports = {
385-
connectionString: "postgres://appuser:apppassword@host:5432/gmrc_commonjs_test",
385+
connectionString: "postgres://dbowner:password@host:5432/gmrc_commonjs_test",
386386
};`,
387387
});
388388
const settings = await getSettings();
389389
expect(settings.connectionString).toEqual(
390-
"postgres://appuser:apppassword@host:5432/gmrc_commonjs_test",
390+
"postgres://dbowner:password@host:5432/gmrc_commonjs_test",
391391
);
392392
mockFs.restore();
393393
});

src/commands/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ export async function init(options: InitArgv = {}): Promise<void> {
4646
*
4747
* RECOMMENDATION: use \`DATABASE_URL\` envvar instead.
4848
*/
49-
// "connectionString": "postgres://appuser:apppassword@host:5432/appdb",
49+
// "connectionString": "postgres://dbowner:password@host:5432/appdb",
5050
5151
/*
5252
* shadowConnectionString: like connectionString, but this is used for the
5353
* shadow database (which will be reset frequently).
5454
*
5555
* RECOMMENDATION: use \`SHADOW_DATABASE_URL\` envvar instead.
5656
*/
57-
// "shadowConnectionString": "postgres://appuser:apppassword@host:5432/appdb_shadow",
57+
// "shadowConnectionString": "postgres://dbowner:password@host:5432/appdb_shadow",
5858
5959
/*
6060
* rootConnectionString: like connectionString, but this is used for

0 commit comments

Comments
 (0)