Skip to content

Commit 6aba759

Browse files
pr feedback + prettier config
1 parent 82e56ff commit 6aba759

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.prettierrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
endOfLine: 'lf',
3+
semi: true,
4+
singleQuote: true,
5+
tabWidth: 2,
6+
trailingComma: 'es5',
7+
printWidth: 100,
8+
arrowParens: 'always',
9+
};

v3-mongodb-v3-sql/dialects/postgres.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,25 @@ module.exports = (knex, inspector) => ({
1111
},
1212

1313
async beforeMigration() {
14-
// await knex.raw(`SET session_replication_role = 'replica';`);
14+
// do nothing for postgres
1515
},
1616

1717
async afterMigration() {
1818
const tableList = await inspector.tables();
1919

2020
// restart sequence for tables
2121
for (const table of tableList) {
22-
let result = await knex.raw("select max(id) from ??", [table]);
22+
let result = await knex.raw('select max(id) from ??', [table]);
2323
const max = result.rows[0].max;
2424

2525
if (max) {
2626
await knex.raw(
2727
`
2828
ALTER SEQUENCE ?? RESTART WITH ??;
2929
`,
30-
[table + "_id_seq", max + 1]
30+
[table + '_id_seq', max + 1]
3131
);
3232
}
3333
}
34-
// await knex.raw(`SET session_replication_role = 'origin';`);
3534
},
3635
});

0 commit comments

Comments
 (0)