The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Switch all mentions of the projects/:ref/sql to the new page projects/:ref/sql/new.
Ivan Vasilov58da5ffe94e7
diff --git a/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx b/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsxindex 608dc285f31..f191bca0397 100644--- a/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx+++ b/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx@@ -56,7 +56,7 @@ const NewProjectPanel = () => {</Button></a></Link>- <Link href={`/project/${ref}/sql`}>+ <Link href={`/project/${ref}/sql/new`}><a><Buttontype="default"diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsxindex d408f04ddc1..3750e811e39 100644--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx@@ -1,10 +1,10 @@-import { IconBarChart, IconFileText, IconList, IconSettings, IconUsers } from 'ui'-import { products } from 'shared-data'import SVG from 'react-inlinesvg'+import { products } from 'shared-data'+import { IconBarChart, IconFileText, IconList, IconSettings } from 'ui'-import { ProjectBase } from 'types'import { Route } from 'components/ui/ui.types'import { BASE_PATH, IS_PLATFORM, PROJECT_STATUS } from 'lib/constants'+import { ProjectBase } from 'types'export const generateToolRoutes = (ref?: string, project?: ProjectBase): Route[] => {const isProjectBuilding = project?.status === PROJECT_STATUS.COMING_UP@@ -35,7 +35,7 @@ export const generateToolRoutes = (ref?: string, project?: ProjectBase): Route[]),link: !IS_PLATFORM? `/project/${ref}/sql/1`- : ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/sql`),+ : ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/sql/new`),},]}diff --git a/studio/components/layouts/SQLEditorLayout/QueryItem.tsx b/studio/components/layouts/SQLEditorLayout/QueryItem.tsxindex 1db2b63f574..27a89f08a27 100644--- a/studio/components/layouts/SQLEditorLayout/QueryItem.tsx+++ b/studio/components/layouts/SQLEditorLayout/QueryItem.tsx@@ -98,7 +98,7 @@ const QueryItemActions = observer(({ tabInfo, activeId }: QueryItemActionsProps)const existingSnippetIds = (snap.orders[ref!] ?? []).filter((x) => x !== id)if (existingSnippetIds.length === 0) {- router.push(`/project/${ref}/sql`)+ router.push(`/project/${ref}/sql/new`)} else {router.push(`/project/${ref}/sql/${existingSnippetIds[0]}`)}diff --git a/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx b/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsxindex fe201ad5f87..a47cadccc94 100644--- a/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx+++ b/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx@@ -147,8 +147,8 @@ const SideBarContent = observer(() => {<div><ProductMenuItemname="Build with AI"- isActive={router.asPath === `/project/${ref}/sql`}- url={`/project/${ref}/sql`}+ isActive={router.asPath === `/project/${ref}/sql/new`}+ url={`/project/${ref}/sql/new`}/><ProductMenuItemname="Templates"diff --git a/studio/next.config.js b/studio/next.config.jsindex 2668a9d1e29..9c0285e192a 100644--- a/studio/next.config.js+++ b/studio/next.config.js@@ -167,6 +167,11 @@ const nextConfig = {destination: '/project/:ref/settings/billing/subscription',permanent: true,},+ {+ source: '/project/:ref/sql',+ destination: '/project/:ref/sql/new',+ permanent: true,+ },]},async headers() {