SQLite3 UNIQUE constraint failed error

后端 未结 2 674
广开言路
广开言路 2020-12-08 21:38

I am trying to create a database which allows users to create \'to do\' lists and fill them with items to complete. However, when inserting data into the tables it gives me

2条回答
  •  自闭症患者
    2020-12-08 22:14

    You have set list_id to be the primary key on the list table, which means that value must be unique for each record. Trying to insert multiple records with the same list_id table is therefore causing the error.

    The issue is the same for the item table.

提交回复
热议问题