Closed hmert closed 7 years ago
Subject should check for existence before creating
Bir hata meydana geldi. An exception occurred while executing 'INSERT INTO subject (id, lft, rgt, root, lvl, slug, total_journal_count, created, updated, deletedAt, createdBy, updatedBy, tags, parent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [13, 0, 0, 0, 0, "sosyal-hizmet", null, "2017-01-18 02:08:38", "2017-01-18 02:08:38", null, "", "", null, 42]: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "subject_pkey" DETAIL: Key (id)=(13) already exists.
problem is solved. We can use ALTER SEQUENCE subject_id_seq RESTART WITH <related number> command in these cases @hmert
ALTER SEQUENCE subject_id_seq RESTART WITH <related number>
Describe issue
Subject should check for existence before creating
Exception Output