From a48488a128c9a4f7b82743277dccaec5ec6d6618 Mon Sep 17 00:00:00 2001 From: Damien Ostler Date: Mon, 27 May 2024 11:17:56 -0400 Subject: [PATCH] fix:supabase+tags+changed data models+seeded data --- .default.env | 5 +- .env | 2 +- .vscode/settings.json | 2 +- README.md | 23 +-- app/api/galleries/[id]/images/count/route.ts | 9 +- app/api/galleries/[id]/images/route.ts | 12 +- app/api/galleries/[id]/thumbnail/route.ts | 98 +++++------ app/api/galleries/route.ts | 14 +- app/gallery/page.tsx | 163 +++++++++---------- app/login/page.tsx | 3 +- components/ui/gallery.tsx | 2 +- components/ui/gallery_thumbnail.tsx | 4 +- supabase/seed.sql | 28 +++- 13 files changed, 187 insertions(+), 178 deletions(-) diff --git a/.default.env b/.default.env index 833b576..291d482 100644 --- a/.default.env +++ b/.default.env @@ -1,3 +1,2 @@ -NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54323 -NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE -NEXT_PUBLIC_ \ No newline at end of file +NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321 +NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE \ No newline at end of file diff --git a/.env b/.env index 1998dcb..de01764 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54323 +NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321 NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 5d0c9ed..7f67c2f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,6 @@ "deno.lint": true, "deno.unstable": true, "[typescript]": { - "editor.defaultFormatter": "denoland.vscode-deno" + "editor.defaultFormatter": "vscode.typescript-language-features" } } diff --git a/README.md b/README.md index 16dbadd..7aeca3d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ - https://nextjs.org/docs - https://supabase.com/docs/ - https://owncast.online/docs/ -- https://docs.npmjs.com/downloading-and-installing-node-js-and-npm - https://docs.docker.com/engine/install/ # Running Backend @@ -17,34 +16,30 @@ You will need docker installed. You will need supabase CLI. - https://docs.docker.com/engine/install/ +You need npm and nodejs installed. See documentation at start of document. +- https://docs.npmjs.com/downloading-and-installing-node-js-and-npm + 1) Open your terminal and navigate to the root of the git repository. 2) Make sure that docker and docker compose are installed. 3) Run `docker-compose --env-file ./docker.env up` which will start up OwnCast. 4) Run `supabase start` +5) Open your terminal and navigate to the root folder of the git repository. +6) Run the command `npm update`. +7) Once the depedencies are pulled and installed you can run the command `npm run dev` to run the application in development mode. +8) Open http://localhost:3000/ ### Updating the database Run `supabase db reset`. This will wipe data. https://supabase.com/docs/guides/cli/local-development?queryGroups=access-method&access-method=kong#database-migrations ## inbucket -http://localhost:54324/monitor +http://localhost:54324su/monitor This is where all mail being sent shows up from the application for developers. ## OwnCast http://localhost:8080/ Configuration is done through the Owncast administration page located on your server under /admin. The login username is admin and the password is your stream key, the default being abc123. -# Running UI -You need npm and nodejs installed. See documentation at start of document. -1) Open your terminal and navigate to the root folder of the git repository. -2) Run the command `npm update`. -3) Once the depedencies are pulled and installed you can run the command `npm run dev` to run the application in development mode. -4) Open http://localhost:3000/ - - - - - # React Components @@ -89,5 +84,5 @@ The `GalleryThumbnail` component is a React component used to display a thumbnai ### Usage This will render a thumbnail for the gallery with the ID of "1". When the thumbnail is clicked, it will log the gallery ID to the console. ```tsx - console.log(id)} /> + //console.log(id)} /> ``` diff --git a/app/api/galleries/[id]/images/count/route.ts b/app/api/galleries/[id]/images/count/route.ts index 346502d..074b973 100644 --- a/app/api/galleries/[id]/images/count/route.ts +++ b/app/api/galleries/[id]/images/count/route.ts @@ -8,11 +8,16 @@ export async function GET( const galleryId = params.id; const supabase = createClient(); + const { data: gallery, error: galleryError } = await supabase + .from('galleries') + .select('*') + .eq('name', galleryId) + .single(); // List all files in the galleryId path - let { data: files, error } = await supabase.storage.from('galleries').list(galleryId); + let { data: files, error } = await supabase.storage.from('galleries').list(gallery.name); if (files==null || error) { - console.error('Error listing files:', error); + //console.error('Error listing files:', error); return NextResponse.error(); } diff --git a/app/api/galleries/[id]/images/route.ts b/app/api/galleries/[id]/images/route.ts index 1e6bf93..8fb989f 100644 --- a/app/api/galleries/[id]/images/route.ts +++ b/app/api/galleries/[id]/images/route.ts @@ -17,22 +17,22 @@ export async function GET( request: Request, { params }: { params: { id: string } } ) { - const galleryId = params.id; - const supabase = createClient(); + + const galleryId = params.id.toLowerCase().replace(/\s+/g, '_'); const supabase = createClient(); const user = await supabase.auth.getUser(); const { data: gallery, error: galleryError } = await supabase .from('galleries') .select('*') - .eq('id', galleryId) + .eq('name', params.id) .single(); - // List all files in the galleryId path + // List all files in the params.id path let { data: files, error } = await supabase.storage.from('galleries').list(galleryId); if (files==null || error) { - console.error('Error listing files:', error); + //console.error('Error listing files:', error); return NextResponse.error(); } @@ -43,7 +43,7 @@ export async function GET( let { data: blobdata, error } = await supabase.storage.from('galleries').download(galleryId+"/"+file.name); if (error || blobdata==null) { - console.error('Error downloading file:', error); + //console.error('Error downloading file:', error); continue; } let blobBuffer = Buffer.from(await blobdata.arrayBuffer()); diff --git a/app/api/galleries/[id]/thumbnail/route.ts b/app/api/galleries/[id]/thumbnail/route.ts index e6e9d63..2ec7804 100644 --- a/app/api/galleries/[id]/thumbnail/route.ts +++ b/app/api/galleries/[id]/thumbnail/route.ts @@ -1,6 +1,5 @@ import { NextResponse } from "next/server"; import { createClient } from "@/utils/supabase/server"; - import sharp from 'sharp'; @@ -13,63 +12,66 @@ async function blurImage(blob: Buffer): Promise { return blurredImage; } + export async function GET( - request: Request, - { params }: { params: { id: string } } - ) { -const galleryId= params.id // 312 + request: Request, + { params }: { params: { id: string } } +) { + const galleryId = params.id.toLowerCase().replace(/\s+/g, '_'); const supabase = createClient(); const user = await supabase.auth.getUser(); + + const { data: gallery, error: galleryError } = await supabase .from('galleries') .select('*') - .eq('id', galleryId) + .eq('name', params.id) .single(); - let userId = user.data.user?.id; - let { data: subscription, error: rolesError } = await supabase + + let { data: files, error } = await supabase.storage.from('galleries').list(galleryId); + if (files == null || files?.length == 0) { + + return NextResponse.error(); + } + + // Loop through each file, download it, convert it to base64, and add the data URL to the array + let { data: blobdata, error: fileError } = await supabase.storage.from('galleries').download(galleryId + "/" + files[0].name); + + if (fileError || blobdata == null) { + //console.error('Error downloading file:', error); + return NextResponse.error(); + } + let blobBuffer = Buffer.from(await blobdata.arrayBuffer()); + + let userId = user.data.user?.id; + let { data: subscription, error: rolesError } = await supabase .from('user_subscriptions') .select('*') .eq('user_id', userId) .single(); + switch (gallery.tier) { + case "Tier 3": + if (subscription?.subscription != "Tier 3") { + blobBuffer = await blurImage(blobBuffer); + } + break; + case "Tier 2": + if (subscription?.subscription != "Tier 3" && subscription?.subscription != "Tier 2") { + blobBuffer = await blurImage(blobBuffer); + } + break; + case "Tier 1": + if (subscription?.subscription != "Tier 3" && subscription?.subscription != "Tier 2" && subscription?.subscription != "Tier 1") { + blobBuffer = await blurImage(blobBuffer); + } + break; + default: + break; + } + const contentType = files[0].name.endsWith('.png') ? 'image/png' : 'image/jpeg'; + const dataUrl = `data:${contentType};base64,${blobBuffer.toString('base64')}`; - // Extract galleryId from the route value - var blob = null; - var contentType = "image/jpeg" - let { data: blobdata, error } = await supabase.storage.from('galleries').download(galleryId+'/1.jpeg') - blob = blobdata; - if (error) { - contentType = "image/png" - let { data: blobdata, error } = await supabase.storage.from('galleries').download(galleryId+'/1.png') - console.log(error) - blob = blobdata; - } - if(blob != null){ - let blobBuffer = Buffer.from(await blob.arrayBuffer()); - switch(gallery.tier){ - case "Tier 3": - if(subscription?.subscription!="Tier 3"){ - blobBuffer = await blurImage(blobBuffer); - } - break; - case "Tier 2": - if(subscription?.subscription!="Tier 3" && subscription?.subscription!="Tier 2"){ - blobBuffer = await blurImage(blobBuffer); - } - break; - case "Tier 1": - if(subscription?.subscription!="Tier 3" && subscription?.subscription!="Tier 2" && subscription?.subscription!="Tier 1"){ - blobBuffer = await blurImage(blobBuffer); - } - break; - default: - if(gallery.nsfw){ - blobBuffer = await blurImage(blobBuffer); - - } - break; - } - const dataUrl = `data:${contentType};base64,${blobBuffer.toString('base64')}`; - return new Response(dataUrl); - } - return NextResponse.error(); + + // Return a JSON response with the array of URLs + return new Response(dataUrl); } \ No newline at end of file diff --git a/app/api/galleries/route.ts b/app/api/galleries/route.ts index 44aebcd..47ebccf 100644 --- a/app/api/galleries/route.ts +++ b/app/api/galleries/route.ts @@ -7,34 +7,32 @@ export async function POST(request: Request) { const url = new URL(request.url); const search = url.searchParams.get("search"); const data = await request.json(); - const tags = data.tags; + const tags = data.tags as string[]; if(tags.length === 0){ let { data: galleries, error } = await supabase .from('galleries') .select('*') .ilike('name', `%${search}%`) - .ilike('description', `%${search}%`); - + //console.log(error) return NextResponse.json(galleries); } else{ // Rest of the code... + console.log(tags) let { data: galleries, error } = await supabase .from('galleries') .select('*') - .contains('tags', tags) + .contains('tags', tags) // Fix: Use contains instead of overlaps .ilike('name', `%${search}%`) - .ilike('description', `%${search}%`) - .order('created_at', { ascending: false }); + //console.log(error) return NextResponse.json(galleries); - return NextResponse.json(galleries); } } // const tagsResponse = await fetch(`/api/galleries/tags?search=${search}`); // const tagsData = await tagsResponse.json(); // const galleriesWithTagData = galleriesData.map((gallery: any) => { -// const tags = tagsData.filter((tag: any) => gallery.tags.includes(tag.id)); +// const tags = tagsData.filter((tag: any) => gallery.tags.includes(tag.name)); // return { ...gallery, tags }; // }); \ No newline at end of file diff --git a/app/gallery/page.tsx b/app/gallery/page.tsx index 81c3021..1c8c08b 100644 --- a/app/gallery/page.tsx +++ b/app/gallery/page.tsx @@ -54,7 +54,7 @@ function PageComponent() { }, body: JSON.stringify({ tags:selectedTags }) }); - console.log(galleriesResponse) + //console.log(galleriesResponse) const galleriesData = await galleriesResponse.json(); const tagsResponse = await fetch(`/api/galleries/tags`); const tagsData = await tagsResponse.json(); @@ -74,95 +74,92 @@ function PageComponent() { } else { setSelectedTags([...selectedTags, tag]); } - console.log(selectedTags) + //console.log(selectedTags) }; return ( - user ? ( -
-
- <> -
-
-
- setSearch(e.target.value)} - /> - -
-
-
- -
- Background +
+ <> +
+
+
+ setSearch(e.target.value)} /> -
- -
-
- {galleries && galleries.map((gallery, index) => ( - +
+
- +
- {isOpen ? ( - <> - - - ) : null} -
- ) : ( -

loading

- ) + +
+ Background +
+ +
+
+ {galleries && galleries.map((gallery, index) => ( + + ))} +
+
+
+
+ +
+ {isOpen ? ( + <> + + + ) : null} +
); } diff --git a/app/login/page.tsx b/app/login/page.tsx index c5349cc..ca33530 100644 --- a/app/login/page.tsx +++ b/app/login/page.tsx @@ -30,8 +30,8 @@ export default async function Login({ password, }); + //console.log(error); if (error) { - console.log(data); return redirect("/login?message=Could not authenticate user"); } @@ -54,6 +54,7 @@ export default async function Login({ }, }); + //console.log(error); if (error) { return redirect("/login?message=Could not authenticate user"); } diff --git a/components/ui/gallery.tsx b/components/ui/gallery.tsx index 6a3a739..3c907fd 100644 --- a/components/ui/gallery.tsx +++ b/components/ui/gallery.tsx @@ -130,7 +130,7 @@ const Gallery = ({ id, columns, closeMenu }: GalleryProps) => { const open = () => { if (selectedImage === null) return; - console.log(selectedImage) + //console.log(selectedImage) let base64Image = selectedImage.split(';base64,').pop(); if (!base64Image) return; let blob = new Blob([Uint8Array.from(atob(base64Image), c => c.charCodeAt(0))], { type: 'image/jpeg' }); // adjust the type as needed diff --git a/components/ui/gallery_thumbnail.tsx b/components/ui/gallery_thumbnail.tsx index 89edbfa..6260cec 100644 --- a/components/ui/gallery_thumbnail.tsx +++ b/components/ui/gallery_thumbnail.tsx @@ -25,9 +25,9 @@ const GalleryThumbnail = ({ id, columns, onSelect, title,nsfw, subscription, tag const getData = async () => { setIsLoading(true); - const thumbnailResponse = await fetch('/api/galleries/' + galleryId + '/thumbnail'); + const thumbnailResponse = await fetch('/api/galleries/' + title + '/thumbnail'); const thumbnailUrl = await thumbnailResponse.text(); - const imagesCountResponse = await fetch('/api/galleries/' + galleryId + '/images/count'); + const imagesCountResponse = await fetch('/api/galleries/' + title + '/images/count'); const imageCount = await imagesCountResponse.json() as number; setImageCount(imageCount); setThumbnailUrl(thumbnailUrl); diff --git a/supabase/seed.sql b/supabase/seed.sql index 5d85368..b00c1fc 100644 --- a/supabase/seed.sql +++ b/supabase/seed.sql @@ -22,6 +22,11 @@ SET row_security = off; -- Data for Name: audit_log_entries; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin -- +INSERT INTO "auth"."audit_log_entries" ("instance_id", "id", "payload", "created_at", "ip_address") VALUES + ('00000000-0000-0000-0000-000000000000', 'd337a17f-a756-46eb-a0e8-8ef80fd0510d', '{"action":"user_signedup","actor_id":"893c7701-d5df-4415-80bd-1ec089764400","actor_username":"damienostler1@outlook.com","actor_via_sso":false,"log_type":"team","traits":{"provider":"email"}}', '2024-05-27 14:10:29.638476+00', ''), + ('00000000-0000-0000-0000-000000000000', 'd3e71df0-114a-4490-aeeb-6f92c45bad74', '{"action":"login","actor_id":"893c7701-d5df-4415-80bd-1ec089764400","actor_username":"damienostler1@outlook.com","actor_via_sso":false,"log_type":"account","traits":{"provider":"email"}}', '2024-05-27 14:10:29.64088+00', ''), + ('00000000-0000-0000-0000-000000000000', '1eab1cf3-5656-42c2-9e0b-796222de0c55', '{"action":"logout","actor_id":"893c7701-d5df-4415-80bd-1ec089764400","actor_username":"damienostler1@outlook.com","actor_via_sso":false,"log_type":"account"}', '2024-05-27 14:15:04.733941+00', ''), + ('00000000-0000-0000-0000-000000000000', '410c5c63-cba5-442a-a6bb-157acc0bd370', '{"action":"login","actor_id":"893c7701-d5df-4415-80bd-1ec089764400","actor_username":"damienostler1@outlook.com","actor_via_sso":false,"log_type":"account","traits":{"provider":"email"}}', '2024-05-27 14:34:43.53365+00', ''); -- @@ -34,12 +39,16 @@ SET row_security = off; -- Data for Name: users; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin -- +INSERT INTO "auth"."users" ("instance_id", "id", "aud", "role", "email", "encrypted_password", "email_confirmed_at", "invited_at", "confirmation_token", "confirmation_sent_at", "recovery_token", "recovery_sent_at", "email_change_token_new", "email_change", "email_change_sent_at", "last_sign_in_at", "raw_app_meta_data", "raw_user_meta_data", "is_super_admin", "created_at", "updated_at", "phone", "phone_confirmed_at", "phone_change", "phone_change_token", "phone_change_sent_at", "email_change_token_current", "email_change_confirm_status", "banned_until", "reauthentication_token", "reauthentication_sent_at", "is_sso_user", "deleted_at", "is_anonymous") VALUES + ('00000000-0000-0000-0000-000000000000', '893c7701-d5df-4415-80bd-1ec089764400', 'authenticated', 'authenticated', 'damienostler1@outlook.com', '$2a$10$ISYdoWsKL7gxfRz7c5IKDOTsmcjNpGgg9OOApYLMOvtOoNTo4HGM6', '2024-05-27 14:10:29.639017+00', NULL, '', NULL, '', NULL, '', '', NULL, '2024-05-27 14:34:43.534227+00', '{"provider": "email", "providers": ["email"]}', '{"sub": "893c7701-d5df-4415-80bd-1ec089764400", "email": "damienostler1@outlook.com", "email_verified": false, "phone_verified": false}', NULL, '2024-05-27 14:10:29.634157+00', '2024-05-27 14:34:43.535377+00', NULL, NULL, '', '', NULL, '', 0, NULL, '', NULL, false, NULL, false); -- -- Data for Name: identities; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin -- +INSERT INTO "auth"."identities" ("provider_id", "user_id", "identity_data", "provider", "last_sign_in_at", "created_at", "updated_at", "id") VALUES + ('893c7701-d5df-4415-80bd-1ec089764400', '893c7701-d5df-4415-80bd-1ec089764400', '{"sub": "893c7701-d5df-4415-80bd-1ec089764400", "email": "damienostler1@outlook.com", "email_verified": false, "phone_verified": false}', 'email', '2024-05-27 14:10:29.636992+00', '2024-05-27 14:10:29.637013+00', '2024-05-27 14:10:29.637013+00', 'b823bde7-9eae-4e1f-8253-75f12f0f06f2'); -- @@ -52,12 +61,16 @@ SET row_security = off; -- Data for Name: sessions; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin -- +INSERT INTO "auth"."sessions" ("id", "user_id", "created_at", "updated_at", "factor_id", "aal", "not_after", "refreshed_at", "user_agent", "ip", "tag") VALUES + ('3499fcf0-59da-493f-ae3b-617ef41b4404', '893c7701-d5df-4415-80bd-1ec089764400', '2024-05-27 14:34:43.534268+00', '2024-05-27 14:34:43.534268+00', NULL, 'aal1', NULL, NULL, 'node', '192.168.65.1', NULL); -- -- Data for Name: mfa_amr_claims; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin -- +INSERT INTO "auth"."mfa_amr_claims" ("session_id", "created_at", "updated_at", "authentication_method", "id") VALUES + ('3499fcf0-59da-493f-ae3b-617ef41b4404', '2024-05-27 14:34:43.535548+00', '2024-05-27 14:34:43.535548+00', 'password', 'dcc35216-f906-4501-812d-f2ed2704ab8e'); -- @@ -76,6 +89,8 @@ SET row_security = off; -- Data for Name: refresh_tokens; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin -- +INSERT INTO "auth"."refresh_tokens" ("instance_id", "id", "token", "user_id", "revoked", "created_at", "updated_at", "parent", "session_id") VALUES + ('00000000-0000-0000-0000-000000000000', 2, 'HsInil2IT99mHjGqk_xeKA', '893c7701-d5df-4415-80bd-1ec089764400', false, '2024-05-27 14:34:43.534857+00', '2024-05-27 14:34:43.534857+00', NULL, '3499fcf0-59da-493f-ae3b-617ef41b4404'); -- @@ -112,6 +127,8 @@ SET row_security = off; -- Data for Name: galleries; Type: TABLE DATA; Schema: public; Owner: postgres -- +INSERT INTO "public"."galleries" ("name", "column_number", "tier", "tags") VALUES + ('Test Gallery', 3, 'Free', '{"Test Tag"}'); -- @@ -139,13 +156,8 @@ INSERT INTO "storage"."buckets" ("id", "name", "owner", "created_at", "updated_a -- INSERT INTO "storage"."objects" ("id", "bucket_id", "name", "owner", "created_at", "updated_at", "last_accessed_at", "metadata", "version", "owner_id") VALUES - ('25ea2051-ae55-4728-90ac-aea08467166c', 'galleries', 'Test Gallery/neroshi-1-3.png', NULL, '2024-05-27 13:15:29.27921+00', '2024-05-27 13:15:29.27921+00', '2024-05-27 13:15:29.27921+00', '{"eTag": "\"2c6f2901ed88fbdd8c790a4b77d9caa8\"", "size": 156786, "mimetype": "image/png", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T13:15:29.267Z", "contentLength": 156786, "httpStatusCode": 200}', '62b23c8b-251a-4410-89b1-c54ba4e26526', NULL), - ('876c4095-98fe-480b-b7f4-9bbe8cb0e9f1', 'galleries', 'Test Gallery/neroshi-3.jpeg', NULL, '2024-05-27 13:15:29.279371+00', '2024-05-27 13:15:29.279371+00', '2024-05-27 13:15:29.279371+00', '{"eTag": "\"7fd95d9da9f3e6c7237a94feedcfc3af\"", "size": 97841, "mimetype": "image/jpeg", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T13:15:29.269Z", "contentLength": 97841, "httpStatusCode": 200}', 'c69a89e2-5cd8-462e-9716-b46bc6992012', NULL), - ('54527fef-4a47-48ed-b7aa-4dc10eb2a421', 'galleries', 'Test Gallery/neroshi-1-2.jpeg', NULL, '2024-05-27 13:15:29.284061+00', '2024-05-27 13:15:29.284061+00', '2024-05-27 13:15:29.284061+00', '{"eTag": "\"a22ea7bfaed689b675b11428b98de42e\"", "size": 705547, "mimetype": "image/jpeg", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T13:15:29.259Z", "contentLength": 705547, "httpStatusCode": 200}', '68f50e59-915a-470a-8c70-ffa24bceeae5', NULL), - ('ab6b077b-96c9-47d5-8b6e-26603a7f5526', 'galleries', 'Test Gallery/neroshi-2.jpeg', NULL, '2024-05-27 13:15:29.284648+00', '2024-05-27 13:15:29.284648+00', '2024-05-27 13:15:29.284648+00', '{"eTag": "\"f8eaf2e06e34ad1b3e101908ab02883e\"", "size": 326461, "mimetype": "image/jpeg", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T13:15:29.272Z", "contentLength": 326461, "httpStatusCode": 200}', 'c53ebb38-77a3-4dba-b5ff-f6b7942938fe', NULL), - ('9f340e7e-ebfe-49e3-b939-ce6a76b00524', 'galleries', 'Test Gallery/neroshi-1.jpeg', NULL, '2024-05-27 13:15:29.29804+00', '2024-05-27 13:15:29.29804+00', '2024-05-27 13:15:29.29804+00', '{"eTag": "\"76b9705bb529b16fc58a4bdb0b134c9b\"", "size": 552385, "mimetype": "image/jpeg", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T13:15:29.273Z", "contentLength": 552385, "httpStatusCode": 200}', 'fd99b1e9-ba96-44fe-943a-1aa23a98db0d', NULL), - ('daa4f8bb-5227-48a8-ae9c-9c9bc0cb61fe', 'galleries', 'Test Gallery/neroshi-4-1.jpeg', NULL, '2024-05-27 13:15:29.305156+00', '2024-05-27 13:15:29.305156+00', '2024-05-27 13:15:29.305156+00', '{"eTag": "\"eac1dd9a94c71dd30f565f95d32b0c6b\"", "size": 1227804, "mimetype": "image/jpeg", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T13:15:29.273Z", "contentLength": 1227804, "httpStatusCode": 200}', 'ffb64256-a72e-453a-8336-56fa12cc901f', NULL), - ('21df51f4-efc9-4076-bc84-9699b6efea72', 'galleries', 'Test Gallery/neroshi-4-2.jpeg', NULL, '2024-05-27 13:15:29.308884+00', '2024-05-27 13:15:29.308884+00', '2024-05-27 13:15:29.308884+00', '{"eTag": "\"d06af35773c09ff8cc1f4a590052be28\"", "size": 456918, "mimetype": "image/jpeg", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T13:15:29.301Z", "contentLength": 456918, "httpStatusCode": 200}', 'aaa5abda-7fb7-46e0-b3ec-a57679276386', NULL); + ('25ea2051-ae55-4728-90ac-aea08467166c', 'galleries', 'test_gallery/neroshi-1-3.png', NULL, '2024-05-27 13:15:29.27921+00', '2024-05-27 14:51:41.449764+00', '2024-05-27 13:15:29.27921+00', '{"eTag": "\"2c6f2901ed88fbdd8c790a4b77d9caa8\"", "size": 156786, "mimetype": "image/png", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T14:51:41.442Z", "contentLength": 156786, "httpStatusCode": 200}', 'c9d36afc-0afe-49e3-87c9-7c1bf5b2824a', NULL), + ('54527fef-4a47-48ed-b7aa-4dc10eb2a421', 'galleries', 'test_gallery/neroshi-1-2.jpeg', NULL, '2024-05-27 13:15:29.284061+00', '2024-05-27 14:51:41.458674+00', '2024-05-27 13:15:29.284061+00', '{"eTag": "\"a22ea7bfaed689b675b11428b98de42e\"", "size": 705547, "mimetype": "image/jpeg", "cacheControl": "max-age=3600", "lastModified": "2024-05-27T14:51:41.442Z", "contentLength": 705547, "httpStatusCode": 200}', '3ea9ec28-b51b-45fd-a273-00d20b9b96f1', NULL); -- @@ -176,7 +188,7 @@ INSERT INTO "storage"."objects" ("id", "bucket_id", "name", "owner", "created_at -- Name: refresh_tokens_id_seq; Type: SEQUENCE SET; Schema: auth; Owner: supabase_auth_admin -- -SELECT pg_catalog.setval('"auth"."refresh_tokens_id_seq"', 1, false); +SELECT pg_catalog.setval('"auth"."refresh_tokens_id_seq"', 2, true); --