Wappler Version : 4.4.5
Operating System : MacOS
Server Model: NodeJS
Database Type: PostgreSQL
Hosting Type: Docker
Expected behavior
What do you think should happen?
Detecting “on update” and “on delete” behavior of database table.
Actual behavior
What actually happens?
Showing “no action” instead of correct value:
My migration:
exports.up = function(knex) {
return knex.schema
.createTable('filho', function (table) {
table.increments('id');
table.integer('usuario_id').unsigned();
table.foreign('usuario_id').references('id').inTable('usuarios').onUpdate('CASCADE').onDelete('RESTRICT');
})
};
exports.down = function(knex) {
return knex.schema
.dropTable('filho')
};
How to reproduce
- Create table A
- Create table B
- Add a relation from table B to table A and set ON DELETE and ON UPDATE
Comment:
Although delete and update behavior isn’t been displayed, it’s effectively there. Trying to delete an table A record that has childs throws error correctly.
Community Page
Last updated:
Last updated: