chore: limit restore dialect (#3534)
This commit is contained in:
parent
14b6c5a628
commit
85af594004
@ -17,6 +17,7 @@ export default class PostgresQueryInterface extends QueryInterface {
|
||||
transaction?: Transaction;
|
||||
}): Promise<void> {
|
||||
const { tableInfo, columnName, seqName, currentVal, transaction } = options;
|
||||
|
||||
if (!seqName) {
|
||||
throw new Error('seqName is required to set auto increment val in postgres');
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ export class Restorer extends AppMigrator {
|
||||
async checkMeta() {
|
||||
const meta = await this.getImportMeta();
|
||||
|
||||
if (meta['dialectOnly'] && !this.app.db.inDialect(meta['dialect'])) {
|
||||
if (!this.app.db.inDialect(meta['dialect'])) {
|
||||
throw new RestoreCheckError(`this backup file can only be imported in database ${meta['dialect']}`);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user