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