mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
fix: update create delete user sql script
This commit is contained in:
@ -1,25 +1,30 @@
|
||||
-- Create deleted@documenso.com
|
||||
INSERT INTO
|
||||
"public"."User" (
|
||||
"email",
|
||||
"emailVerified",
|
||||
"password",
|
||||
"createdAt",
|
||||
"updatedAt",
|
||||
"lastSignedIn",
|
||||
"roles",
|
||||
"identityProvider",
|
||||
"twoFactorEnabled"
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
'deleted@documenso.com',
|
||||
'2024-02-05 11:58:39.668 UTC',
|
||||
NULL,
|
||||
'2024-02-05 11:58:39.670 UTC',
|
||||
'2024-02-05 11:58:39.670 UTC',
|
||||
'2024-02-05 11:58:39.670 UTC',
|
||||
ARRAY['USER'::TEXT]::"public"."Role" [],
|
||||
CAST('GOOGLE'::TEXT AS "public"."IdentityProvider"),
|
||||
FALSE
|
||||
)
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM "public"."User" WHERE "email" = 'deleted@documenso.com') THEN
|
||||
INSERT INTO
|
||||
"public"."User" (
|
||||
"email",
|
||||
"emailVerified",
|
||||
"password",
|
||||
"createdAt",
|
||||
"updatedAt",
|
||||
"lastSignedIn",
|
||||
"roles",
|
||||
"identityProvider",
|
||||
"twoFactorEnabled"
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
'deleted@documenso.com',
|
||||
NOW(),
|
||||
NULL,
|
||||
NOW(),
|
||||
NOW(),
|
||||
NOW(),
|
||||
ARRAY['USER'::TEXT]::"public"."Role" [],
|
||||
CAST('GOOGLE'::TEXT AS "public"."IdentityProvider"),
|
||||
FALSE
|
||||
);
|
||||
END IF;
|
||||
END $$
|
||||
|
||||
Reference in New Issue
Block a user