-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/shesha-io/shesha-framework
- Loading branch information
Showing
17 changed files
with
307 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
shesha-core/src/Shesha.Framework/Migrations/PostgreSql/M20230725153499.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using FluentMigrator; | ||
using Shesha.FluentMigrator; | ||
|
||
namespace Shesha.Migrations.PostgreSql | ||
{ | ||
[Migration(20230725153499), PostgreSqlOnly] | ||
public class M20230725153499 : OneWayMigration | ||
{ | ||
public override void Up() | ||
{ | ||
Execute.Sql( | ||
@"CREATE OR REPLACE FUNCTION public.""log_Frwk_UserLoginAttempts_UpdateLastLoginDate_AI""() | ||
RETURNS trigger | ||
LANGUAGE 'plpgsql' | ||
COST 100 | ||
VOLATILE NOT LEAKPROOF | ||
AS $BODY$ | ||
BEGIN | ||
IF NEW.""UserId"" IS NOT NULL AND NEW.""ResultLkp"" = 1 THEN | ||
UPDATE ""AbpUsers"" | ||
SET ""LastLoginDate"" = NEW.""CreationTime"" | ||
WHERE ""Id"" = NEW.""UserId""; | ||
END IF; | ||
RETURN NEW; | ||
END; | ||
$BODY$;"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.