From 100b8a6883eb2c4965f2c0fd775177ebc546fb53 Mon Sep 17 00:00:00 2001 From: fritz-net Date: Mon, 15 Nov 2021 12:48:27 +0100 Subject: [PATCH] fixed issue with table names not in lower case in postgresql (cherry picked from commit 516a7d56576f0acb24c10cb762038aaa809e765b) --- src/Laraue.EfCoreTriggers.PostgreSql/PostgreSqlProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Laraue.EfCoreTriggers.PostgreSql/PostgreSqlProvider.cs b/src/Laraue.EfCoreTriggers.PostgreSql/PostgreSqlProvider.cs index 3910f49..1601a57 100644 --- a/src/Laraue.EfCoreTriggers.PostgreSql/PostgreSqlProvider.cs +++ b/src/Laraue.EfCoreTriggers.PostgreSql/PostgreSqlProvider.cs @@ -116,7 +116,7 @@ public override SqlBuilder GetTriggerSql(Trigger .Append(" RETURN NEW;END;") .Append($"${trigger.Name}$ LANGUAGE plpgsql;") .Append($"CREATE TRIGGER {trigger.Name} {GetTriggerTimeName(trigger.TriggerTime)} {trigger.TriggerEvent.ToString().ToUpper()} ") - .Append($"ON {GetTableName(typeof(TTriggerEntity))} FOR EACH ROW EXECUTE PROCEDURE {trigger.Name}();"); + .Append($"ON \"{GetTableName(typeof(TTriggerEntity))}\" FOR EACH ROW EXECUTE PROCEDURE {trigger.Name}();"); } protected override string GetNewGuidExpressionSql() => "uuid_generate_v4()";