我需要从我的旧用户数据库迁移到一个新的....但幸运的是密码和盐字段的值在两者上是相同的,但列名不同(在旧表上:用户密码->秘密,在新表上:新用户密码->盐)
如何从现有的用户数据生成插入转储?每当我做类似的事情时
SELECT id,
username,
LOWER(username) AS username_canonical,
email,
LOWER(email) AS email_canonical,
passhash AS 'password',
secret AS salt,
1 AS enabled,
'a:0:{}' AS roles,
0 AS credentials_expired,
0 AS expired,
0 AS locked,
uploaded,
downloaded,
torrent_pass,
0 AS torrent_pass_version
FROM
temp2.users AS fos_user
WHERE enabled = 'yes' ;
我可以看到 phpMyAdmin 中正确列出的值......但是当我导出结果时,我看到旧结构中的插入:
INSERT INTO `fos_user` (`id`, `username`, `username`, `email`,
`email`, `passhash`, `secret`, `enabled`, `a:0:{}`,
`credentials_expired`, `expired`, `locked`, `uploaded`,
`downloaded`, `torrent_pass`, `torrent_pass_version`)
VALUES....