Update missing order settings in database import order file
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
# functions
|
# functions
|
||||||
function/update_function.sql
|
function/set_uid.sql
|
||||||
|
function/set_generic.sql
|
||||||
function/random_string.sql
|
function/random_string.sql
|
||||||
|
function/set_edit_generic.sql
|
||||||
function/edit_set_access_uid.sql
|
function/edit_set_access_uid.sql
|
||||||
|
function/edit_log_insert_trigger.sql
|
||||||
# generic tables
|
# generic tables
|
||||||
table/edit_temp_files.sql
|
table/edit_temp_files.sql
|
||||||
table/edit_generic.sql
|
table/edit_generic.sql
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
CREATE OR REPLACE FUNCTION set_uid() RETURNS TRIGGER AS '
|
CREATE OR REPLACE FUNCTION set_uid() RETURNS TRIGGER AS '
|
||||||
DECLARE
|
DECLARE
|
||||||
random_length INT = 12; -- that should be long enough
|
random_length INT = 32; -- that should be long enough
|
||||||
BEGIN
|
BEGIN
|
||||||
IF TG_OP = ''INSERT'' THEN
|
IF TG_OP = ''INSERT'' THEN
|
||||||
NEW.uid := random_string(random_length);
|
NEW.uid := random_string(random_length);
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
-- adds the created or updated date tags
|
-- adds the created or updated date tags
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION set_generic() RETURNS TRIGGER AS '
|
-- OLD, DEPRECATED, use set_generic.sql
|
||||||
BEGIN
|
|
||||||
IF TG_OP = ''INSERT'' THEN
|
-- CREATE OR REPLACE FUNCTION set_generic() RETURNS TRIGGER AS '
|
||||||
NEW.date_created := clock_timestamp();
|
-- BEGIN
|
||||||
NEW.user_created := current_user;
|
-- IF TG_OP = ''INSERT'' THEN
|
||||||
ELSIF TG_OP = ''UPDATE'' THEN
|
-- NEW.date_created := clock_timestamp();
|
||||||
NEW.date_updated := clock_timestamp();
|
-- NEW.user_created := current_user;
|
||||||
NEW.user_updated := current_user;
|
-- ELSIF TG_OP = ''UPDATE'' THEN
|
||||||
END IF;
|
-- NEW.date_updated := clock_timestamp();
|
||||||
RETURN NEW;
|
-- NEW.user_updated := current_user;
|
||||||
END;
|
-- END IF;
|
||||||
' LANGUAGE 'plpgsql';
|
-- RETURN NEW;
|
||||||
|
-- END;
|
||||||
|
-- ' LANGUAGE 'plpgsql';
|
||||||
|
|||||||
Reference in New Issue
Block a user