X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/397e706b4c72c9fe818b8c549b7ae59fe7671d95..b2bedb6b5eff41a17ddb194df1c75213b841f3bb:/sql/Pg-upgrade2/shops_3.sql

diff --git a/sql/Pg-upgrade2/shops_3.sql b/sql/Pg-upgrade2/shops_3.sql
new file mode 100644
index 000000000..1be783055
--- /dev/null
+++ b/sql/Pg-upgrade2/shops_3.sql
@@ -0,0 +1,14 @@
+-- @tag: shop_3
+-- @description: Add columns itime and mtime and transaction_description for table shops
+-- @charset: UTF-8
+-- @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();
