title: Default value in sql laravel table
body: <p>I not sure if this is related to Laravel or not but I created the table with Laravel. I've got a table called <code>programmers</code></p>
  <pre><code>DESC programmers;
  +--------------+---------------------+------+-----+---------+----------------+
  | Field        | Type                | Null | Key | Default | Extra          |
  +--------------+---------------------+------+-----+---------+----------------+
  | id           | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
  | name         | varchar(255)        | NO   |     | NULL    |                |
  | age          | int(11)             | NO   |     | NULL    |                |
  | created_at   | timestamp           | YES  |     | NULL    |                |
  | updated_at   | timestamp           | YES  |     | NULL    |                |
  | framework_id | int(10) unsigned    | NO   |     | NULL    |                |
  | test         | tinyint(1)          | NO   |     | NULL    |                |
  +--------------+---------------------+------+-----+---------+----------------+
  </code></pre>
  <p>as you can see there's a column called <code>test</code> that's not nullable and has a default value of null. When I to run the following command from the database I expected an error</p>
  <pre><code>INSERT INTO  programmers (name, age, framework_id) VALUES ('Melly2', 19, 2)
  </code></pre>
  <p>it actually worked fine and here's the data</p>
  <pre><code>SELECT * FROM programmers;
  +----+--------+-----+---------------------+---------------------+--------------+------+
  | id | name   | age | created_at          | updated_at          | framework_id | test |
  +----+--------+-----+---------------------+---------------------+--------------+------+
  |  1 | melly  |  20 | 2022-05-03 16:36:12 | 2022-05-03 16:36:12 |            1 |    0 |
  |  2 | Melly2 |  19 | NULL                | NULL                |            2 |    0 |
  +----+--------+-----+---------------------+---------------------+--------------+------+
  </code></pre>
  <p>the <code>test</code> column actually defaulted to <code>0</code> not <code>null</code>, and if I were to run the following command it tells me I can't have null as a value as expected</p>
  <pre><code>INSERT INTO  programmers (name, age, framework_id, test) VALUES ('Melly2', 19, 3, null);
  ERROR 1048 (23000): Column 'test' cannot be null
  </code></pre>
  <p>question: can someone briefly explain why <code>test</code> column didn't default to <code>null</code>?</p>