2020-10-27 17:06:58 +01:00
|
|
|
DO $$DECLARE
|
|
|
|
this_version CONSTANT varchar := '00.00.007';
|
|
|
|
BEGIN
|
|
|
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
|
|
|
IF FOUND THEN RETURN; END IF;
|
|
|
|
|
|
|
|
ALTER TABLE public."UserInfo" ADD COLUMN userstatus smallint;
|
|
|
|
|
|
|
|
UPDATE public."UserInfo" SET userstatus=0;
|
|
|
|
|
|
|
|
ALTER TABLE public."UserInfo" ALTER COLUMN userstatus SET NOT NULL;
|
|
|
|
|
2020-11-04 15:28:14 +01:00
|
|
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.007', '2020-10-27 13:40:00.000000+03', now(), 'Add userstatus on UserInfo table');
|
2020-10-27 17:06:58 +01:00
|
|
|
END$$;
|