WIP - additional fixes for multitenant

This commit is contained in:
Francisco Gaona
2025-11-30 10:09:21 +01:00
parent 57f27d28cd
commit 5a80f33078
12 changed files with 206 additions and 165 deletions

View File

@@ -5,28 +5,28 @@ exports.up = function (knex) {
table.string('slug', 255).notNullable().unique();
table.string('label', 255).notNullable();
table.text('description');
table.integer('displayOrder').defaultTo(0);
table.integer('display_order').defaultTo(0);
table.timestamps(true, true);
table.index(['slug']);
})
.createTable('app_pages', (table) => {
table.uuid('id').primary().defaultTo(knex.raw('(UUID())'));
table.uuid('appId').notNullable();
table.uuid('app_id').notNullable();
table.string('slug', 255).notNullable();
table.string('label', 255).notNullable();
table.string('type', 50).notNullable(); // List, Detail, Custom
table.string('objectApiName', 255);
table.integer('displayOrder').defaultTo(0);
table.string('object_api_name', 255);
table.integer('display_order').defaultTo(0);
table.timestamps(true, true);
table
.foreign('appId')
.foreign('app_id')
.references('id')
.inTable('apps')
.onDelete('CASCADE');
table.unique(['appId', 'slug']);
table.index(['appId']);
table.unique(['app_id', 'slug']);
table.index(['app_id']);
});
};