Database-detailed explanation of field attributes
Unsigned
- Unsigned integer
- Once declared, the column cannot be declared as a negative number
Zerofill
- 0 padding
- Fill the insufficient digits with 0
Self-increasing
- Automatically +1 on the basis of the previous record (default)
- Usually used to design a unique primary key, it must be an integer type
- The starting value and step length of the primary key can be customized
Not null
- Assuming it is set to not null, if you don't assign a value to it, an error will be reported!
- If it is set to null, the default value is null if not filled in!
default
-
Set default
-
If you do not specify the value of the column, there will be a default value
expansion: each table must have the following five fields -
id primary key
-
version
Optimistic lock -
is_delete pseudo delete
-
gmt_create creation time
-
gmt_updaye modification time