mysql - 我无法登录基于 Prestashop 1.7 的电子商店。 (数据库中没有 ps_employee 表。)

标签 mysql prestashop prestashop-1.7

我在数据库中找不到 ps_employee 表。

这张 table 有可能刚刚消失吗? 如何创建新帐户并添加新的管理员帐户?

最佳答案

当然,该表不可能自行消失,无论如何,您可以将其与关联的 _shop 表一起创建:

CREATE TABLE IF NOT EXISTS `ps_employee` (
  `id_employee` int(10) unsigned NOT NULL auto_increment,
  `id_profile` int(10) unsigned NOT NULL,
  `id_lang` int(10) unsigned NOT NULL DEFAULT '0',
  `lastname` varchar(32) NOT NULL,
  `firstname` varchar(32) NOT NULL,
  `email` varchar(128) NOT NULL,
  `passwd` varchar(60) NOT NULL,
  `last_passwd_gen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `stats_date_from` date DEFAULT NULL,
  `stats_date_to` date DEFAULT NULL,
  `stats_compare_from` date DEFAULT NULL,
  `stats_compare_to` date DEFAULT NULL,
  `stats_compare_option` int(1) unsigned NOT NULL DEFAULT 1,
  `preselect_date_range` varchar(32) DEFAULT NULL,
  `bo_color` varchar(32) DEFAULT NULL,
  `bo_theme` varchar(32) DEFAULT NULL,
  `bo_css` varchar(64) DEFAULT NULL,
  `default_tab` int(10) unsigned NOT NULL DEFAULT '0',
  `bo_width` int(10) unsigned NOT NULL DEFAULT '0',
  `bo_menu` tinyint(1) NOT NULL DEFAULT '1',
  `active` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `optin` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `id_last_order` int(10) unsigned NOT NULL DEFAULT '0',
  `id_last_customer_message` int(10) unsigned NOT NULL DEFAULT '0',
  `id_last_customer` int(10) unsigned NOT NULL DEFAULT '0',
  `last_connection_date` date DEFAULT NULL,
  `reset_password_token` varchar(40) DEFAULT NULL,
  `reset_password_validity` datetime DEFAULT NULL,
  PRIMARY KEY (`id_employee`),
  KEY `employee_login` (`email`,`passwd`),
  KEY `id_employee_passwd` (`id_employee`,`passwd`),
  KEY `id_profile` (`id_profile`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;

CREATE TABLE IF NOT EXISTS `ps_employee_shop` (
  `id_employee` INT(11) UNSIGNED NOT NULL,
  `id_shop` INT(11) UNSIGNED NOT NULL,
  PRIMARY KEY (`id_employee`,`id_shop`),
  KEY `id_shop` (`id_shop`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;

现在只需要添加一条包含您的帐户详细信息的记录,在passwd中您可以添加任何文本,因为您需要在管理员登录页面中恢复密码。

关于mysql - 我无法登录基于 Prestashop 1.7 的电子商店。 (数据库中没有 ps_employee 表。),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51943906/

相关文章:

mysql - SQL语句用变量测试外键字段?

prestashop - 自定义 Cookie 变量 + Prestashop

html - 删除页脚 Prestashop 上的 h4 标签

php - InnoDB表中MySQL全文的替换相关性排序?

PHP函数显示从最高分到用户时间戳的排名

python - 使用 Python 向 API Prestashop 发送请求

vagrant - Prestashop 安装宅基地指南

php - Prestashop 1.7 Hook 操作CustomerAccountAdd 未触发

php - 无法将字符串偏移量用作数组 - 我需要在 foreach 中反序列化吗?

prestashop - KNET 支付网关 "failed Unable to open resource"Prestashop 错误