forked from zpanel/zpanelx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...nfig_packs/centos_6_5/zpanelx-install/sql/zpanelx-update/10-0-2/sql/x_accounts-update.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* Update SQL for CentOS 6 ZPanel 10.0.1 to 10.0.2 */ | ||
/* Adds the new fields for account password changes */ | ||
DELIMITER $$ | ||
|
||
USE `zpanel_core`; $$ | ||
|
||
DROP PROCEDURE IF EXISTS AddColumnUnlessExists $$ | ||
CREATE PROCEDURE AddColumnUnlessExists() | ||
BEGIN | ||
|
||
-- add a column safely | ||
IF NOT EXISTS( (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='zpanel_core' | ||
AND COLUMN_NAME='ac_passsalt_vc' AND TABLE_NAME='x_accounts') ) THEN | ||
ALTER TABLE `x_accounts` | ||
ADD COLUMN `ac_passsalt_vc` VARCHAR(22) | ||
NULL DEFAULT NULL AFTER `ac_resethash_tx`; | ||
END IF; | ||
|
||
END $$ | ||
|
||
CALL AddColumnUnlessExists() $$ | ||
DROP PROCEDURE IF EXISTS AddColumnUnlessExists $$ | ||
DELIMITER ; |