Where
by Where
~1 min read

-DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_unicode_ci

—character-set-server=utf8mb4 —collation-server=utf8mb4_unicode_ci —default_time_zone=+8:00

  1. 新建数据库
    • Database Encoding :utf8mb4
    • Database Collation :utf8mb4_unicode_ci
  2. 新建表
    • Table Encoding :utf8mb4
    • Table Collation :utf8mb4_unicode_ci
    • Table Type :InnoDB
    • 包含一个主键:id
      `id` int(11) NOT NULL AUTO_INCREMENT,
      
    • 包含created_at,updated_at,deleted_at三个字段
      `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `deleted_at` timestamp NULL DEFAULT NULL