mysql命令總結

一、新增字段token

alter table oc_customer add email_status tinyint(1) NOT NULL DEFAULT 0;
alter table oc_customer add phone_status tinyint(1) NOT NULL DEFAULT 0;
alter table oc_customer add token_exptime int(11) NOT NULL DEFAULT 0;
alter table oc_customer add token_email varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;ci

二、建立數據表table

DROP TABLE IF EXISTS `oc_customer_active_email`;
CREATE TABLE `oc_customer_active_email`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NULL DEFAULT NULL,
  `token_email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `token_exptime` int(11) NULL DEFAULT NULL,
  `email_status` int(1) NULL DEFAULT NULL,
  `addtime` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;email

SET FOREIGN_KEY_CHECKS = 1;im

相關文章
相關標籤/搜索