Commit Graph

28 Commits

Author SHA1 Message Date
Bobbie Soedirgo
1d58f2a11b chore: use @supabase/pg-meta for role queries (#22821)
* chore: use @supabase/pg-meta for role queries

* chore: prettier

* fix: typo
2024-04-17 16:19:49 +07:00
Bobbie Soedirgo
f327f2b234 chore: use @supabase/pg-meta for schema mutation (#22619)
* chore: use @supabase/pg-meta for schema mutation

* fix schemas query invalidation

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2024-04-17 11:04:21 +07:00
Joshen Lim
05eac4af51 Chore/switch index advisor installation to db extension (#22773)
* Switch installing index advisor to via db extension rather than direct sql

* Add CTA if index advisor is not available

* Update language

* Update copy

* Fix checking index advisor ext

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-04-16 21:27:11 +07:00
Joshen Lim
b07f8304e0 Feat/integrate index advisor (#22641)
* Update

* Clean up + fix UI

* Add data values to tab

* Add comment

* Format sql query in query details

* Clean uo

* Deprecate old files

* Address comments

* chore: update styles (#22591)

* Midway integrating index advisor

* Add feature flag, reinstate old UI for feature flag

* First iteration of integrating index advisor

* Add more details in index advisor and add feature flag

* Shift explain_query function into pg_temp

* Clean uo

* fix padding

* Update apps/studio/components/interfaces/QueryPerformanceV2/QueryPanel.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Update UI

* Address some feedback

* Moar addressing feedback

* Update docs url

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-04-11 23:27:34 +08:00
Joshen Lim
ec59752bc0 Query Performance Facelift (#22568)
* Update

* Clean up + fix UI

* Add data values to tab

* Add comment

* Format sql query in query details

* Clean uo

* Deprecate old files

* Address comments

* chore: update styles (#22591)

* Add feature flag, reinstate old UI for feature flag

* Update apps/studio/components/interfaces/QueryPerformanceV2/QueryPerformance.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Update apps/studio/components/interfaces/QueryPerformance/QueryPerformance.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Address feedback

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-04-11 12:57:46 +08:00
Joshen Lim
1f388cc98e Set different colors for RLS templates UPDATE and ALL, and add placeholders with using and with check monaco fields (#22401) 2024-04-02 14:51:35 +02:00
Bobbie Soedirgo
8888bb0023 feat: initial version of @supabase/pg-meta (#22307)
* feat: initial version of @supabase/pg-meta

Unlike supabase/postgres-meta, this will be a pure-JS SQL & Zod schema builder

* chore: typescript 5.4

* fix: typescript errors
2024-04-01 18:07:34 +08:00
Joshen Lim
2fe00724a9 Read replicas support enabling physical backups (#22330)
* Read replicas support enabling physical backups rather than forcing a PITR addon

* Update

* Update endpoint

* Add missing warning for compute size on read replicas

* Update text

* Address feedback
2024-04-01 16:08:36 +07:00
Joshen Lim
5e5586d0ad Remove the check for connection string in create schema mutation (#22229) 2024-03-26 15:42:35 +07:00
Kevin Grüneberg
136728f6ab perf: reorganize a few imports to improve bundle size (#21743) 2024-03-05 12:49:58 +08:00
Kevin Grüneberg
f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Joshen Lim
0ddd1b4711 Remove duplicated types-query, use enumerated-types-query instead (#21632)
* Remove duplicated types-query, use enumerated-types-query instead

* Fix type
2024-02-29 11:29:57 +08:00
Joshen Lim
95991e3135 Fix view definition query (#21590) 2024-02-27 15:18:07 +08:00
Joshen Lim
dcdc3cd230 Fix table editor unable to update PK after renaming table (#21285)
* Fix table editor unable to update PK after renaming table

* Lint
2024-02-26 06:21:42 +00:00
Joshen Lim
7556a3181c Update error handling for table editor RQs (#21443) 2024-02-22 16:29:10 +08:00
Joshen Lim
632f8f95f4 Chore/pooler strings for read replicas (#21383)
* Midway

* Show respective pooler parameters based on selected database

* Add optional params to DatabaseSelector to de-async state between connection string and connection params on database settings page

* remove badge
2024-02-21 14:50:53 +08:00
Joshen Lim
0ee75935f7 Support for composite foreign keys in table editor (#21078)
* Init foreign keys manage

* Midway

* Midway

* Implement functionality for new foreign key management flow in table editor

* Deprecate old add and remove foreign key queries

* Lint

* Set editor dirty when managing foreign keys

* Add basic validation in new ForeignKeySelector

* Remove FK management in column editor, deprecate old foreign key selector components

* Add validation on columnm types for foreign keys

* Set column type to foreign key type if new column

* Show appropriate notices for when referenced column doesnt match source column type

* fix

* Remove comment

* Lint

* ColumnEditor swap position of data type and Fk
2024-02-13 10:42:06 +08:00
Ivan Vasilov
a18c11807d fix: Refetch project details when reseting the database password (#21053)
Invalidate the project details (and refetch the connection string) when the user resets the DB password.
2024-02-06 17:15:07 +01:00
Joshen Lim
351fa698ce Update GET and PATCH pooling config to use supavisor endpoints (#20944)
* Update GET and PATCH pooling config to use supavisor endpoints

* Fix TS warning

* Small fix

* Remove unused import
2024-02-06 15:03:10 +08:00
Alaister Young
a4f86bce8f chore: increase react-query stale time (#19465)
* chore: increase react-query stale time

* keep staleTime: 0 for table rows

* use staleTime: 0 for all user sql queries

* use staleTime: 0 for all pg-meta queries

* Some fixes

* fix updating tables

* fix bug while editing column names

* Fix deleting column in database/tables column list not revalidating UI

* Fix updating column in database/tables column list throwing ane rror

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-06 13:47:05 +08:00
Kevin Grüneberg
f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
Joshen Lim
683fe3a6cd Chore/update database settings (#20575)
* Add connection string syntax

* Add more description to pooling modes

* Fix

* Test

* Fix

* Sm wording change

* Update apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx

* prettier

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-01-22 11:07:17 +07:00
Joshen Lim
09a77a85e5 Chore/update database connection string settings (#20429)
* Slight refactor to DatabaseConnectionString

* Add IPv4 deprecation warning to database connection strings + link to pooler settings

* Add description in connection pool url to show the format

* Add badges to connection settings and connection pooling settings RE resolving to ipv4 or ipv6

* Add default pooler size as placeholder in connection  pooling depending on compute instance size

* Fix badge

* Add note to use session pool mode in pooler settings if using prepared statements in db

* Shift connection pooling settings up top and change titles of panels

* Fix

* Update pooling size default value based on compute size

* Show max client conns for supavisor pooling settings

* Adjust copywriting

* Combine database settings and connection strings sections

* Address comments

* Update description to use 5432 as alternative for pooling when using prepared statements

* Fix
2024-01-16 13:38:32 +08:00
Kevin Grüneberg
d12332ea5a chore: xmas cleanup (#19938) 2024-01-04 17:27:49 +01:00
Ivan Vasilov
82d21d7ed6 chore: Migrate Connection Pooling form to use react-hook-form (#19743)
* Fix the position of the error in the profile information form.

* Update the query and the mutation for the connection pooling to use data/fetchers methods.

* Refactor the connection pooling form to use react-hook-form.

* Handle null values also.

* Make the headers same case everywhere.

* Set the data after updating.
2023-12-15 08:17:36 -03:30
Ivan Vasilov
8879dd273a fix: Fix max connections label (#19627)
* Convert the SQL query to react-query. Minor refactor.

* Make the widget better in case of a API call failure.
2023-12-13 11:20:47 +01:00
Joshen Lim
18840b5e3b Chore/column editor show types from extensions schema (#19580)
* Show types from extensions schema in table editor

* Shift postgres types to RQ

* Deprecate types store in mobx

* Address feedback

* Update label
2023-12-11 15:11:23 +07:00
Ivan Vasilov
436bdb10ae chore: Move the studio app to apps/studio (#18915)
* Move all studio files from /studio to /apps/studio.

* Move studio specific prettier ignores.

* Fix the ui references from studio.

* Fix the css imports.

* Fix all package.json issues.

* Fix the prettier setup for the studio app.

* Add .turbo folder to prettierignore.

* Fix the github workflows.
2023-11-15 12:38:55 +01:00