Wappler Version : 3.81.
Operating System : Mac OS
Server Model: Node.js
Database Type: Postgres
Hosting Type: Docker
Expected behavior
What do you think should happen?
When create a reference field, Wappler should create a Knex migration with the fields references
Actual behavior
What actually happens?
References are not created on database
How to reproduce
- Create 2 tables, with a 1-N relation and apply changes
- Edit the child table, adding reference to FK
- Check the database using any third party software (I’m using Postbird), the references are not being applied
- Check Knex migration
Table structure after adding references via Wappler
Wappler Knex generated script:
exports.up = function(knex) {
return knex.schema
.table('public.job_jobtype', function (table) {
table.integer('job_id', 255).alter().unsigned();
table.integer('jobtype_id', 255).alter().unsigned();
})
};
exports.down = function(knex) {
return knex.schema
.table('public.job_jobtype', function (table) {
table.integer('job_id', 255).alter();
table.integer('jobtype_id', 255).alter();
})
};