Created
September 22, 2023 00:19
-
-
Save khattaksd/4e8f4c89f4e928a2ecaad56d4a17ecd1 to your computer and use it in GitHub Desktop.
Revisions
-
khattaksd created this gist
Sep 22, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,67 @@ -- supabase/seed.sql -- -- create test users INSERT INTO auth.users ( instance_id, id, aud, role, email, encrypted_password, email_confirmed_at, recovery_sent_at, last_sign_in_at, raw_app_meta_data, raw_user_meta_data, created_at, updated_at, confirmation_token, email_change, email_change_token_new, recovery_token ) ( select '00000000-0000-0000-0000-000000000000', uuid_generate_v4 (), 'authenticated', 'authenticated', 'user' || (ROW_NUMBER() OVER ()) || '@example.com', crypt ('password123', gen_salt ('bf')), current_timestamp, current_timestamp, current_timestamp, '{"provider":"email","providers":["email"]}', '{}', current_timestamp, current_timestamp, '', '', '', '' FROM generate_series(1, 10) ); -- test user email identities INSERT INTO auth.identities ( id, user_id, identity_data, provider, last_sign_in_at, created_at, updated_at ) ( select uuid_generate_v4 (), id, format('{"sub":"%s","email":"%s"}', id::text, email)::jsonb, 'email', current_timestamp, current_timestamp, current_timestamp from auth.users );