X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=sql%2FPg-upgrade2%2Fshops_3.sql;fp=sql%2FPg-upgrade2%2Fshops_3.sql;h=9bfcc733f0ae78570cb921f1070f138e12e2a420;hp=0000000000000000000000000000000000000000;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/sql/Pg-upgrade2/shops_3.sql b/sql/Pg-upgrade2/shops_3.sql new file mode 100644 index 000000000..9bfcc733f --- /dev/null +++ b/sql/Pg-upgrade2/shops_3.sql @@ -0,0 +1,13 @@ +-- @tag: shop_3 +-- @description: Add columns itime and mtime and transaction_description for table shops +-- @depends: shops +-- @ignore: 0 + +ALTER TABLE shops ADD COLUMN transaction_description TEXT; +ALTER TABLE shops ADD COLUMN itime timestamp DEFAULT now(); +ALTER TABLE shops ADD COLUMN mtime timestamp DEFAULT now(); + +CREATE TRIGGER mtime_shops + BEFORE UPDATE ON shops + FOR EACH ROW + EXECUTE PROCEDURE set_mtime();