feat: clean up the imported temp files

This commit is contained in:
Ahmed Bouhuolia
2024-04-09 00:09:32 +02:00
parent aaa8f39e50
commit 0684e50ebd
22 changed files with 239 additions and 88 deletions

View File

@@ -0,0 +1,22 @@
exports.up = function (knex) {
return knex.schema.createTable('imports', (table) => {
table.increments();
table.string('filename');
table.string('import_id');
table.string('resource');
table.json('columns');
table.json('mapping');
table.json('params');
table
.bigInteger('tenant_id')
.unsigned()
.index()
.references('id')
.inTable('tenants');
table.timestamps();
});
};
exports.down = function (knex) {
return knex.schema.dropTableIfExists('imports');
};