Closed burki closed 8 years ago
Similar issue with creating a new book:
INSERT INTO scalar_db_books
(title
, slug
, user
, created
, stylesheet
, template
) VALUES ('My Title', 'my-title', 1, '2016-03-03 14:34:19', 'minimal', 'cantaloupe')
Since fields 'description' / 'thumbnail' / 'background' / 'custom_style' are defined as NOT NULL without a DEFAULT in scalar_db_books
See reply at https://github.com/anvc/scalar/issues/36
Upon user-registration, I get the error Field 'password' doesn't have a default value for the query INSERT INTO
scalar_db_users
(fullname
,email
) VALUES ('My Name', 'my@email') generated by $data = array('fullname' => $fullname, 'email' => $email); $this->db->insert($this->users_table, $data); in https://github.com/anvc/scalar/blob/master/system/application/models/user_model.php (MySQL 5.6)The reason is that you set password as NOT NULL without a DEFAULT in:
CREATE TABLE IF NOT EXISTS
scalar_db_users
( ...password
varchar(255) COLLATE utf8_unicode_ci NOT NULL, .. )but you only set fullname and email in the insert