+
+ )
+}
+
+export default discussions
diff --git a/apps/temp-docs/pages/index.tsx b/apps/temp-docs/pages/index.tsx
index 6fe909bff2d..1eabb91b43b 100644
--- a/apps/temp-docs/pages/index.tsx
+++ b/apps/temp-docs/pages/index.tsx
@@ -1,5 +1,5 @@
import { getDocsBySlug } from '../lib/docs'
-import Layout from '../components/layouts/Layout'
+import Layout from '../components/layouts/DocsLayout'
import { serialize } from 'next-mdx-remote/serialize'
import { MDXRemote } from 'next-mdx-remote'
import { MDXProvider } from '@mdx-js/react'
diff --git a/apps/www/_blog/2022-06-07-beta-update-may-2022.mdx b/apps/www/_blog/2022-06-07-beta-update-may-2022.mdx
index 19705ce4509..c3b70e34898 100644
--- a/apps/www/_blog/2022-06-07-beta-update-may-2022.mdx
+++ b/apps/www/_blog/2022-06-07-beta-update-may-2022.mdx
@@ -14,7 +14,7 @@ It's been another packed month of shipping like crazy at Supabase, here's the up
## Wildcard Auth Redirects
-Wildcard redirects are especially useful for Jamstack platforms with preview deployments, like Vercel and Netlify. Now you can add a wildcard domain, like `*.mydomain.com/welcome` and both `x.mydomain.com/welcome` and `y.mydomain.com/welcome` will be be accepted. [Read the Pull Request](https://github.com/supabase/gotrue/pull/334).
+Wildcard redirects are especially useful for Jamstack platforms with preview deployments, like Vercel and Netlify. Now you can add a wildcard domain, like `*.mydomain.com/welcome` and both `x.mydomain.com/welcome` and `y.mydomain.com/welcome` will be accepted. [Read the Pull Request](https://github.com/supabase/gotrue/pull/334).
[](https://github.com/supabase/gotrue/pull/334)
diff --git a/apps/www/_blog/2022-06-15-loading-data-supabase-python.mdx b/apps/www/_blog/2022-06-15-loading-data-supabase-python.mdx
index 91306eddc43..2d95520cd81 100644
--- a/apps/www/_blog/2022-06-15-loading-data-supabase-python.mdx
+++ b/apps/www/_blog/2022-06-15-loading-data-supabase-python.mdx
@@ -30,7 +30,7 @@ Before we dive in, let’s look at some prerequisites you'll need:
## Loading data into Supabase using Python
-Supabase is built for developers, and you can [get started for free](https://app.supabase.io) using your existing Github account. Once your Supabase account is set up, you will access the Supabase dashboard. From here, go to All Project > New Project.
+Supabase is built for developers, and you can [get started for free](https://app.supabase.com) using your existing Github account. Once your Supabase account is set up, you will access the Supabase dashboard. From here, go to All Project > New Project.

@@ -173,6 +173,6 @@ Data can also be viewed directly from the Supabase dashboard. To do this, go to
Note: In case you cannot see any of the data, you should hit the Refresh button.
## Conclusion
-With Python, data loading into Supabase is easy. It just takes a few easy steps to get started with the Python SDK and Supabase. In the next part of this blog series, we will learn how to visualize the data that we just loaded into Supabase using Metabase. Stay tuned!
+With Python, data loading into Supabase is easy. It just takes a few easy steps to get started with the Python SDK and Supabase. In the next part of this blog series, we will learn [how to visualize the data that we just loaded into Supabase using Metabase](blog/2022/06/29/visualizing-supabase-data-using-metabase). Stay tuned!
If you have any questions please reach out via [Twitter](https://twitter.com/supabase) or join our [Discord](https://discord.supabase.com).
diff --git a/apps/www/_blog/2022-06-29-visualizing-supabase-data-using-metabase.mdx b/apps/www/_blog/2022-06-29-visualizing-supabase-data-using-metabase.mdx
new file mode 100644
index 00000000000..bd087260f5d
--- /dev/null
+++ b/apps/www/_blog/2022-06-29-visualizing-supabase-data-using-metabase.mdx
@@ -0,0 +1,135 @@
+---
+title: Visualizing Supabase Data using Metabase
+description: How to create different kinds of charts out of data stored in Supabase using Metabase.
+author: ant_wilson
+image: python-1/supabase-python-metabase.png
+thumb: python-1/supabase-python-metabase.png
+tags:
+ - python
+ - open-source
+ - community
+date: '2022-06-29'
+toc_depth: 3
+---
+
+Data helps organizations make better decisions. With a programming language like Python to analyze your data and transform data into visual representations, you can effortlessly tell the story of your business. One way to create customized visuals from your data would be to use data visualization libraries in Python like [Matplotlib](https://matplotlib.org/), [Seaborn](https://seaborn.pydata.org/), [Ggplot2](https://ggplot2.tidyverse.org/index.html), [Plotly](https://plotly.com/), or [Pandas](https://pandas.pydata.org/). When you want to accomplish this task with little or no code (not even SQL), you might consider using tools like [Metabase](https://www.metabase.com/).
+
+With Metabase, a powerful visualization tool, you can quickly turn your data into easy-to-understand visuals like graphs, pie charts, flow diagrams, and much more. Then, using Metabase’s intuitive interface, you can cut through the data noise and focus on what’s essential for your business.
+
+In the previous blog of this series**,** we explained [how to use Python to load data into Supabase](https://supabase.com/blog/2022/06/15/loading-data-supabase-python). In this blog, we will create different kinds of charts out of the data stored in Supabase using Metabase.
+
+## Prerequisites
+
+Before we dive in, let’s look at some prerequisites that you will need:
+
+- **Supabase project with data**
+
+Based on our [previous article](https://supabase.com/blog/2022/06/15/loading-data-supabase-python), we assume we already have a Supabase project setup and have data loaded into it.
+
+- **Metabase Docker Container**
+
+To take advantage of the open-source version of Metabase, you can use the Metabase docker container [here](https://docs.docker.com/engine/install/).
+
+## Visualizing data in Supabase with Metabase
+
+### Launching Metabase
+
+To launch Metabase, simply go to "" which is the default port that the Metabase server will be listening to.
+
+After Metabase is launched, select your preferred language and add your contact information. In the _Add your data_ markdown, you will need to choose PostgreSQL.
+
+
+
+You will be prompted to add the necessary connection information to your Supabase project. Go to your [Supabase project](https://app.supabase.com/) and hit _Settings > Database to get the database info_.
+
+
+
+Enter the necessary information on Metabase and hit next. Finally, select your data preference, after which you will land on the Metabase homepage.
+
+### View Database and Tables
+
+We can now see the "Supabase DB" Supabase project under "Our data".
+
+
+
+To view the tables, go to _SupabaseDB > public_
+
+
+
+### View Table Data Insights
+
+Go back to the home page and select public schema under "Try these x-rays based on your data"
+
+
+
+Here is the output of the product table.
+
+
+
+As you can see, we can get some handy information from this like:
+
+- How many products are present with a given range of inventory count.
+- How many products are present for a given range of price.
+- The ratio between the number of employees to the number of products.
+- How many products each vendor has created.
+
+If you have column-specific views, you can select the _zoom-in_ option under _More x-rays_.
+
+
+
+For example, let's select the total employees field.
+
+
+
+With information like this, you will be able to answer some key questions like
+
+- What are some common statistics for company employees like average, minimum, maximum, and standard deviation?
+- What is the distribution of the employees across different geo locations?
+- What is the distribution of the employees across different vendors?
+
+## Using custom SQL queries
+
+We can also use custom queries to set up our dashboards. To do this, go to _New > SQL query._
+
+
+
+Next, under the database, select "SupabaseDB".
+
+
+
+We will be using the following SQL query:
+
+```sql
+SELECT "Vendor".vendor_name, product_name, "Vendor".total_employees
+FROM "Product"
+LEFT JOIN "Vendor" on "Product".vendor_id = "Vendor".vendor_id
+WHERE "Vendor".total_employees
+```
+
+This query should fetch us the vendor name and the product where the number of employees for a given vendor is less than 110.
+
+To run the SQL query, hit the play button.
+
+
+
+This will be shown below in the output window. To visualize the data, hit the visualization button.
+
+
+
+Next, select the type of visualizer you want. Let us choose _Bar_.
+
+
+
+Choose the appropriate x-axis and y-axis fields, and you will be able to view the data in bar format.
+
+
+
+## Conclusion
+
+Data visualization empowers organizations to turn unused data into actionable insights, leading to faster and better decision-making. Why wait?
+
+
+
+With our [free tier Supabase account](https://app.supabase.com/), you can start a new project today and use Metabase to visualize your app data.
+
+If you have any questions please reach out via [Twitter](https://twitter.com/supabase) or join our [Discord](https://discord.supabase.com).
diff --git a/apps/www/components/AuthWidget/AuthWidget.tsx b/apps/www/components/AuthWidget/AuthWidget.tsx
index f93461e1258..c5715623260 100644
--- a/apps/www/components/AuthWidget/AuthWidget.tsx
+++ b/apps/www/components/AuthWidget/AuthWidget.tsx
@@ -84,6 +84,7 @@ function AuthPage() {
+
+ >
+ )}
+ >
+ )}
+
+ {!member.invited_at && (
+ <>
+
+ } onClick={handleMemberDelete}>
+ Remove member
+
+ >
+ )}
>
}
>
@@ -640,7 +752,7 @@ const OwnerDropdown = observer(({ members, member }: any) => {
text={
By transferring this organization, it will be solely owned by{' '}
- {member.profile.username}, they
+ {member.profile?.username}, they
will also be able to remove you from the organization as a member
}
diff --git a/studio/stores/pgmeta/MetaStore.ts b/studio/stores/pgmeta/MetaStore.ts
index 986680b48dc..901c926650b 100644
--- a/studio/stores/pgmeta/MetaStore.ts
+++ b/studio/stores/pgmeta/MetaStore.ts
@@ -135,6 +135,8 @@ export default class MetaStore implements IMetaStore {
projectRef?: string
connectionString?: string
baseUrl: string
+
+ // [Joshen] I'm going to treat this as a list of system schemas
excludedSchemas = [
'auth',
'extensions',
@@ -146,6 +148,7 @@ export default class MetaStore implements IMetaStore {
'storage',
'supabase_functions',
'graphql',
+ 'graphql_public',
]
constructor(rootStore: IRootStore, options: { projectRef: string; connectionString: string }) {
diff --git a/studio/types/base.ts b/studio/types/base.ts
index f89b9da7edf..a99454c52ee 100644
--- a/studio/types/base.ts
+++ b/studio/types/base.ts
@@ -55,6 +55,8 @@ export interface Member {
primary_email: string
username: string
}
+ invited_id?: number
+ invited_at?: string
}
export interface ResponseError {
diff --git a/web/docs/guides/integrations/prisma.mdx b/web/docs/guides/integrations/prisma.mdx
index 09411d99dfe..2ffa0ba8850 100644
--- a/web/docs/guides/integrations/prisma.mdx
+++ b/web/docs/guides/integrations/prisma.mdx
@@ -160,6 +160,37 @@ Error querying the database: db error: ERROR: prepared statement “s0” alread
This is a known issue and it is being worked on, you can follow the progress on this [GitHub issue](https://github.com/prisma/prisma/issues/6485).
If you want to learn more about Prisma, check out the [docs](https://www.prisma.io/docs). Also in case you have any questions or run into any issue, feel free to start a discussion in the repo’s [discussions section](https://github.com/prisma/prisma/discussions).
+## Troubleshooting
+
+If you run `prisma migrate dev --name init` multiple times, it sometimes asks if you want to recreate the whole schema. If you chose yes, it will delete the public schema and recreates it. The default grants are missing after this. If you run into this problem, add a helper SQL for fixing the grants:
+
+```sql
+CREATE SCHEMA IF NOT EXISTS "auth";
+CREATE SCHEMA IF NOT EXISTS "extensions";
+create extension if not exists "uuid-ossp" with schema extensions;
+create extension if not exists pgcrypto with schema extensions;
+create extension if not exists pgjwt with schema extensions;
+
+grant usage on schema public to postgres, anon, authenticated, service_role;
+grant usage on schema extensions to postgres, anon, authenticated, service_role;
+alter user supabase_admin SET search_path TO public, extensions; -- don't include the "auth" schema
+
+grant all privileges on all tables in schema public to postgres, anon, authenticated, service_role, supabase_admin;
+grant all privileges on all functions in schema public to postgres, anon, authenticated, service_role, supabase_admin;
+grant all privileges on all sequences in schema public to postgres, anon, authenticated, service_role, supabase_admin;
+
+alter default privileges in schema public grant all on tables to postgres, anon, authenticated, service_role;
+alter default privileges in schema public grant all on functions to postgres, anon, authenticated, service_role;
+alter default privileges in schema public grant all on sequences to postgres, anon, authenticated, service_role;
+
+alter default privileges for user supabase_admin in schema public grant all on sequences to postgres, anon, authenticated, service_role;
+alter default privileges for user supabase_admin in schema public grant all on tables to postgres, anon, authenticated, service_role;
+alter default privileges for user supabase_admin in schema public grant all on functions to postgres, anon, authenticated, service_role;
+
+alter role anon set statement_timeout = '3s';
+alter role authenticated set statement_timeout = '8s';
+```
+
## Resources
- [Prisma](https://prisma.io) official website.
diff --git a/web/package-lock.json b/web/package-lock.json
index 0d029015f2a..3832cdd1c88 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -13,7 +13,7 @@
"@kiwicopple/prism-react-renderer": "https://github.com/kiwicopple/prism-react-renderer.git",
"@octokit/core": "^3.5.1",
"docusaurus-theme-search-typesense": "^0.4.0",
- "jsrsasign": "^10.4.1",
+ "jsrsasign": "^10.5.25",
"mermaid": "^8.13.8",
"react": "^17.0.2",
"react-dom": "^17.0.2",
@@ -8609,9 +8609,9 @@
}
},
"node_modules/jsrsasign": {
- "version": "10.5.24",
- "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.5.24.tgz",
- "integrity": "sha512-0i/UHRgJZifp/YmoXHyNQXUY4eKWiSd7YxuD7oKEw9mlqgr51hg9lZQw2nlEDvwHDh7pyj6ZjYlxldlW27xb/Q==",
+ "version": "10.5.25",
+ "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.5.25.tgz",
+ "integrity": "sha512-N7zxHaCwYvFlXsybq4p4RxRwn4AbEq3cEiyjbCrWmwA7g8aS4LTKDJ9AJmsXxwtYesYx0imJ+ITtkyyxLCgeIg==",
"funding": {
"url": "https://github.com/kjur/jsrsasign#donations"
}
@@ -20289,9 +20289,9 @@
}
},
"jsrsasign": {
- "version": "10.5.24",
- "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.5.24.tgz",
- "integrity": "sha512-0i/UHRgJZifp/YmoXHyNQXUY4eKWiSd7YxuD7oKEw9mlqgr51hg9lZQw2nlEDvwHDh7pyj6ZjYlxldlW27xb/Q=="
+ "version": "10.5.25",
+ "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.5.25.tgz",
+ "integrity": "sha512-N7zxHaCwYvFlXsybq4p4RxRwn4AbEq3cEiyjbCrWmwA7g8aS4LTKDJ9AJmsXxwtYesYx0imJ+ITtkyyxLCgeIg=="
},
"keyv": {
"version": "3.1.0",
diff --git a/web/package.json b/web/package.json
index 0be0daeb3b1..ae31dbb666c 100644
--- a/web/package.json
+++ b/web/package.json
@@ -20,7 +20,7 @@
"@kiwicopple/prism-react-renderer": "https://github.com/kiwicopple/prism-react-renderer.git",
"@octokit/core": "^3.5.1",
"docusaurus-theme-search-typesense": "^0.4.0",
- "jsrsasign": "^10.4.1",
+ "jsrsasign": "^10.5.25",
"mermaid": "^8.13.8",
"react": "^17.0.2",
"react-dom": "^17.0.2",