I'm trying to add the flowing `insert`:

```
INSERT INTO `user` 
(`name`, `family`, `status`, `mobile`,  `ip`, `lastIp`, `seenTime`, `createTime`, `updateTime`) 
VALUES 
('Mehdi Abbasi', NULL, 4, '989197659980',  '149.154.167.210', '149.154.167.210', 1507650436, 1507650436, 1507650436)

```

And in database i have this:

[![Database values](https://i.stack.imgur.com/wXyJ4.png)](https://i.stack.imgur.com/wXyJ4.png)

Null value for family save as `null` in database and there is no problem about that but skipped cols like `email` filled by `NULL` and when trying to add another user whiteout email get duplicate key error from database.

> 
> Note: `email` field has unique key.
> 
> 
> 

This problem is strange because it's worked in the past.

Table schema is:

```
CREATE TABLE `user` (
  `id` int(11) NOT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `passwordResetToken` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `family` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` smallint(1) NOT NULL DEFAULT '1',
  `ip` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `lastIp` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `seenTime` int(20) DEFAULT NULL,
  `updateTime` int(20) DEFAULT NULL,
  `createTime` int(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for table `user`
--
ALTER TABLE `user`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`),
  ADD UNIQUE KEY `mobile` (`mobile`),
  ADD UNIQUE KEY `passwordResetToken` (`passwordResetToken`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

```

For example `passwordResetToken` and `email` give `NULL` but `family` not.
Value in `family` col make no problem but `email` make.