How to do knex.js migrations?

前端 未结 6 1454
天命终不由人
天命终不由人 2021-02-01 19:39

I\'m still not sure how to do my migrations with knex. Here is what I have so far. It works on up, but down gives me FK constraint error even though fo

6条回答
  •  不知归路
    2021-02-01 19:43

    inTable() should be placed after references():

    inTablecolumn.inTable(table)

    Sets the table where the foreign key column is located after calling column.references.

    Documentation.

提交回复
热议问题