CREATE TABLE weeki.users (
id INT(11) NOT NULL AUTO_INCREMENT,
username VARCHAR(255) NOT NULL,
name VARCHAR(50) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
registration_id TEXT DEFAULT NULL,
api TEXT NOT NULL,
created_At DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
disabled TINYINT(1) DEFAULT 0,
status VARCHAR(130) DEFAULT 'Just another user',
icon TEXT DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE INDEX id (id)
)
MySQL#1050 - 表'用户'已存在
答案 0 :(得分:1)
在您的情况下运行此查询:
DROP TABLE IF EXISTS `weeki.users`;
CREATE TABLE weeki.users (
id INT(11) NOT NULL AUTO_INCREMENT,
username VARCHAR(255) NOT NULL,
name VARCHAR(50) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
registration_id TEXT DEFAULT NULL,
api TEXT NOT NULL,
created_At DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
disabled TINYINT(1) DEFAULT 0,
status VARCHAR(130) DEFAULT 'Just another user',
icon TEXT DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE INDEX id (id)
)