#######################################################################
#
# AdminCP: 在 引入 & 維護選項, 執行 MySQL 查詢 升級資料庫
#######################################################################
ALTER TABLE userfield ADD lastsignatureid SMALLINT NOT NULL DEFAULT 0;
ALTER TABLE usertextfield ADD signature1 MEDIUMTEXT NOT NULL DEFAULT '';
ALTER TABLE usertextfield ADD signature2 MEDIUMTEXT NOT NULL DEFAULT '';
...
ALTER TABLE usertextfield ADD signatureN MEDIUMTEXT NOT NULL DEFAULT '';
ALTER TABLE usertextfield ADD sig_title1 VARCHAR(50) NOT NULL DEFAULT 'Signature 1';
ALTER TABLE usertextfield ADD sig_title2 VARCHAR(50) NOT NULL DEFAULT 'Signature 2';
...
ALTER TABLE usertextfield ADD sig_titleN VARCHAR(50) NOT NULL DEFAULT 'Signature N';
UPDATE usertextfield SET signature1 = signature;
UPDATE usertextfield SET signature2 = signature;
...
UPDATE usertextfield SET signatureN = signature;
UPDATE userfield,usertextfield SET lastsignatureid = 1 WHERE userfield.userid=usertextfield.userid AND usertextfield.signature <> '';
** Please note that 'First Signature' should be exactly the same as that
** entered in the previous section (Add Phrases).
** Change this to 'Last Edited Signature' or 'Random Signature' to set
** the all users' default signature at installation.
UPDATE userfield SET fieldX = '主要簽名';
#####
Note: N is the number of signatures per user.
#######################################################################
#
# AdminCP: 在 風格 & 模板, 風格管理中,
|