chore: test
This commit is contained in:
parent
91f19c2419
commit
1575364736
@ -542,4 +542,8 @@ export class Collection<
|
||||
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public quotedTableName() {
|
||||
return this.db.utils.quoteTable(this.addSchemaTableName());
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ describe('dump', () => {
|
||||
app = mockServer();
|
||||
|
||||
db = app.db;
|
||||
await app.cleanDb();
|
||||
|
||||
app.db.collection({
|
||||
name: 'users',
|
||||
@ -52,7 +53,6 @@ describe('dump', () => {
|
||||
fields: [],
|
||||
});
|
||||
|
||||
await app.cleanDb();
|
||||
await db.sync();
|
||||
});
|
||||
|
||||
|
@ -177,7 +177,7 @@ ORDER BY table_schema, table_name`,
|
||||
const dataStream = fs.createWriteStream(dataFilePath);
|
||||
|
||||
const rows = await app.db.sequelize.query(
|
||||
sqlAdapter(app.db, `SELECT * FROM ${collection.isParent() ? 'ONLY' : ''} "${collection.model.tableName}"`),
|
||||
sqlAdapter(app.db, `SELECT * FROM ${collection.isParent() ? 'ONLY' : ''} ${collection.quotedTableName()}`),
|
||||
{
|
||||
type: 'SELECT',
|
||||
},
|
||||
|
@ -19,9 +19,7 @@ describe('ui schema model', () => {
|
||||
|
||||
db = app.db;
|
||||
|
||||
const queryInterface = db.sequelize.getQueryInterface();
|
||||
await queryInterface.dropAllTables();
|
||||
|
||||
await db.clean({ drop: true });
|
||||
app.plugin(PluginUiSchema, { name: 'ui-schema-storage' });
|
||||
|
||||
await app.load();
|
||||
|
@ -23,7 +23,7 @@ describe('ui_schema repository with cache', () => {
|
||||
db = app.db;
|
||||
cache = app.cache;
|
||||
|
||||
await db.sequelize.getQueryInterface().dropAllTables();
|
||||
await db.clean({ drop: true });
|
||||
|
||||
app.plugin(PluginUiSchema, { name: 'ui-schema-storage' });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user