Unable to fully import database
Afolic opened this issue · comments
Afolic commented
Good day, thanks for this amazing project, I am trying to set this up on my local machine and I get the following error message "ERROR 1364 (HY000) at line 53: Field 'id' doesn't have a default value". I amd trying to import the sql file using the following command on my terminal "mysql -u root -pmyPassword < /path//assets/setup/DBcreation.sql"
Muhammad Saad commented
sorry for the late reply.
- it might help knowing what DBMS or server you are using, for example, the most common DBMS for web related applications is phpmyadmin.
- Another possibility might be that the default table type for your DBMS might be different (it is InnoDB for phpmyadmin, as far as i know with my past experiences). This might be the more likely issue, since such a problem could result in the id columns not being recognized as auto-incrementing columns. It might help to manually set the database type to InnoDB at the start of the sql file. if that does not work, try erasing the InnoDB parameter at the end of each table entirely.
Muhammad Saad commented
Clarification: In the last step, i am referring to these parameters at the end of the table declarations in the SQL dump file:
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;