feat: link and unlink document to resource model

This commit is contained in:
Ahmed Bouhuolia
2024-05-24 19:50:06 +02:00
parent c8f31f33be
commit 8f904fae3a
14 changed files with 347 additions and 20 deletions

View File

@@ -0,0 +1,13 @@
exports.up = function (knex) {
return knex.schema.createTable('document_links', (table) => {
table.increments('id').primary();
table.string('model_ref').notNullable();
table.string('model_id').notNullable();
table.integer('document_id').unsigned();
table.timestamps();
});
};
exports.down = function (knex) {
return knex.schema.dropTableIfExists('document_links');
};