I am using this package to seed my data into DB, it was working months ago with the same CSV. But today, i tried to re-run my seeder and something weird happened.
I have CSV with these data :
id;option;question_number;most;least;type;option_b;question_number_b
1;1;53;A;;C;0;0
2;3;53;C;;C;0;0
But everytime i tried to seed, the seeder always return error
Rows of the file "/database/seeds/csv/TblMTestQuestion.csv" has been failed to insert: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'option_b' cannot be null (SQL: insert intotbl_m_test_questions(created_at,id,least,most,option,option_b,question_number,question_number_b,type,updated_at) values (2020-08-13 13:50:12, 1, ?, A, 1, ?, 53, ?, C, 2020-08-13 13:50:12), (2020-08-13 13:50:12, 2, ?, C, 3, ?, 53, ?, C, 2020-08-13 13:50:12)
I did not intend to seed a null value to the option_b column, i tried to set 0 on the integer field of option_b.
Hello,
I am using this package to seed my data into DB, it was working months ago with the same CSV. But today, i tried to re-run my seeder and something weird happened.
I have CSV with these data : id;option;question_number;most;least;type;option_b;question_number_b 1;1;53;A;;C;0;0 2;3;53;C;;C;0;0
But everytime i tried to seed, the seeder always return error
Rows of the file "/database/seeds/csv/TblMTestQuestion.csv" has been failed to insert: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'option_b' cannot be null (SQL: insert into
tbl_m_test_questions(
created_at,
id,
least,
most,
option,
option_b,
question_number,
question_number_b,
type,
updated_at) values (2020-08-13 13:50:12, 1, ?, A, 1, ?, 53, ?, C, 2020-08-13 13:50:12), (2020-08-13 13:50:12, 2, ?, C, 3, ?, 53, ?, C, 2020-08-13 13:50:12)
I did not intend to seed a null value to the option_b column, i tried to set 0 on the integer field of option_b.