mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Added procedure to avoid migrate fail in tbackup
This commit is contained in:
parent
c65d7d27a3
commit
4178343313
@ -1291,9 +1291,19 @@ UPDATE twidget_dashboard SET id_widget = (SELECT id FROM twidget WHERE unique_na
|
|||||||
DELETE FROM twidget WHERE unique_name = 'graph_availability';
|
DELETE FROM twidget WHERE unique_name = 'graph_availability';
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- Table `tbackup`
|
-- Table `tbackup` (Extension table. Modify only if exists)
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
ALTER TABLE tbackup ADD COLUMN `filepath` varchar(512) NOT NULL DEFAULT "";
|
delimiter //
|
||||||
|
CREATE PROCEDURE addcol()
|
||||||
|
BEGIN
|
||||||
|
SET @vv1 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tbackup');
|
||||||
|
IF @vv1>0 THEN
|
||||||
|
ALTER TABLE tbackup ADD COLUMN `filepath` varchar(512) NOT NULL DEFAULT "";
|
||||||
|
END IF;
|
||||||
|
END;
|
||||||
|
//
|
||||||
|
CALL addcol();
|
||||||
|
DROP PROCEDURE addcol;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- Table `tconfig`
|
-- Table `tconfig`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user