mirror of
https://github.com/frappe/books.git
synced 2025-01-12 19:06:38 +00:00
fix: Foreign key creation
This commit is contained in:
parent
4d616c075f
commit
d1bbda829a
@ -97,9 +97,9 @@ module.exports = class Database extends Observable {
|
||||
}
|
||||
|
||||
// link
|
||||
if (field.fieldtype === 'Link' && field.target && column.foreign) {
|
||||
if (field.fieldtype === 'Link' && field.target) {
|
||||
let meta = frappe.getMeta(field.target);
|
||||
column
|
||||
table
|
||||
.foreign(field.fieldname)
|
||||
.references('name')
|
||||
.inTable(meta.getBaseDocType())
|
||||
|
Loading…
Reference in New Issue
Block a user