* Shift database tables to id route and fix add foreign key CTA not working
* Clean up unused imports
* Fix
* Update apps/studio/components/interfaces/TableGridEditor/DeleteConfirmationDialogs.tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
---------
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* Refactor and remove the CreateFunctionStore.
* Fix a duplicate key in the functions table.
* More fixes for the create-function form.
* Add excluded schemas to schema selector.
* Cleanup the createFunction code after the merge.
* Remove unneeded wrapper fragments.
* Minor fixes for the FormItemLayout stories.
* Refactor the CreateFunction panel using the new FormItemLayout.
* Revert the migration to use FormItemLayout. Will revisit later.
* Add a CSS class for popover content width to match its trigger width. Use it on the schema selector.
* Replace all listboxes with selects.
* Fix the comments.
* Switch to FormItemLayout wherever possible.
* Move the createFunction file to its own folder.
* Refactor the panel to use shadcn components: Sheet, SheetContent and SheetHeader.
* Add showClose prop to the Sheet component.
* Add function editor and a feature to maximize/minimize the code editor.
* Some fixes
* Add sameWidthAsTrigger to the popover component.
* Fix the icon size.
---------
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Refactor and remove the CreateFunctionStore.
* Fix a duplicate key in the functions table.
* More fixes for the create-function form.
* Add excluded schemas to schema selector.
* Cleanup the createFunction code after the merge.
* Remove unneeded wrapper fragments.
* Minor fixes for the FormItemLayout stories.
* Refactor the CreateFunction panel using the new FormItemLayout.
* Revert the migration to use FormItemLayout. Will revisit later.
* Add a CSS class for popover content width to match its trigger width. Use it on the schema selector.
* Replace all listboxes with selects.
* Fix the comments.
* Switch to FormItemLayout wherever possible.
* Some fixes
* minor lint
* One more lint
---------
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Final replacements of ui setNotification with toast
* Rip out UiStore
* Rip out UiStore
* Shift files under authConfigSchema to components/Auth
* Rip out use of observers
* Replace all methods of MetaStore with react queries.
* Remove unneeded usages of MetaStore.
* Remove RootStore completely. The only thing left from these stores is uiStore.
* Remove unnecessary comments.
* Delete MetaStore.
* Fix the usage of the wrong toaster.
* Remove unused variables
* Remove onSqlQuery
* Convert some ui setNotification calls to direct toast calls
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Staging: only allow apse1 as selection for replica
* Fix modal stuck in loading state if dropping replica fails for some reason
* Add warnings for RR based on cloud provider and pg version, and fix support page not automatically selecting project ref from query param into form
* Add warnings on add ons side panels for compute and pitr RE replicas
* Add notice text RE changing compute size if read replicas are preent
* Add options to change compute size and delete all replicas from settings/infrastructure
* Lint
* Fix small issues with the tables and keys.
* Refactor the TimezoneSelection with shadcn components.
* Dont pass active to the NavMenuItem.
* Fix the double hash in the _ page.
* Fix an error where an input received an undefined as value.
* Fix increase retention period in PITR disabled incorrectly
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* 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
* Change all imports in the ui package which import via the @ui shortcut.
* Add a new ui-patterns package. Add it to all apps.
* Migrate PrivacySettings from ui to ui-patterns.
* Migrate ConsentToast from ui to ui-patterns.
* Remove providers folder from ui package.
* Move GlassPanel.
* Migrate IconPanel.
* Migrate TweetCard.
* Migrate ThemeImage.
* Remove LWXCountdownBanner.
* Migrate CountdownWidget.
* Migrate SchemaTableNode.
* Migrate ExpandableVideo.
* Migrate ThemeToggle.
* Fix bunch of imports in the docs app.
* Revert some unnecessary changes.
* Expand the README.md.
* Fix the tailwind configs, they were using old folder structure.
* Fix leftover merge conflicts.
* Remove a deleted page in master.
---------
Co-authored-by: Terry Sutton <saltcod@gmail.com>
* Dashboard-bug-fix: in Enumerated type > Create type > SidePanel Opens add value field count fixed
* Small refactor
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Reset state and set enable form actions for add role sidebar.
* Update apps/studio/components/interfaces/Database/Roles/CreateRolePanel.tsx
* Update apps/studio/components/interfaces/Database/Roles/CreateRolePanel.tsx
* Revert
---------
Co-authored-by: Santosh Pisini <>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* add a view into the dropdown
* Fix a code error.
* Remove the unnecessary tooltip.root.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Trim enum values when creating or updating enums on database enums page
* Fix database webhooks truncate name if too long
* Wrap badges in DB triggers page
* 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
* add privileges page
* fix
* fix: could have both global and column-specific privileges + is global per privilege
* Trigger Build
* load permissions data for current table only
* fix style for light theme
* add a guide to Privileges
* Update apps/docs/pages/guides/auth/column-level-security.mdx
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
* Update apps/docs/pages/guides/auth/column-level-security.mdx
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
* Update doc
* Update docs
* progress moving privileges to pg-meta
* split up column privileges and table privileges
* adds loading state to toggles
* Add feature flag, move from auth section to database section
* Cleanup
* Update meta store table lists, add header warnings, update docs
* Add alert if any columns have privilages
* Spelling
* fix api.d.ts
* fix link
* move to auth pages
* only show editable schemas
* limit roles
* auto select first table
* remove roles meta store
* inline toggling
* apply privileges all at once
* add preview and use new switch component
* fix spelling
* handle long column names
* warn users about losing changes when changing schemas/tables
* remove strange docs link
* fix feature preview after reload
* use shadcn select
* Update select.tsx
* Minor UX fixes
* Update toast
* Update feature preview image for cls
* update cls warnings
* update warnings
* fix toast message
* Add migration alert to preview page
* Add link to CLS from feature preview, and add empty state on CLS page if feature preview is not enabled
* Shift local storage keys hard code to lib/constants
---------
Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Only fetch the tables from the required schema in the MetaStore.
* Don't include the columns in the getTables API call unless a flag is passed.
* Use the new flag in the ForeignKeySelector.
* Columns should be included for the schema visualizer.
* Address comments.
* Move listEncryptedColumns method to a function.
* Remove encryptColumn method since it's unused.
* Add CRUD RQ queries/mutations for vault secrets.
* Use the new queries/mutations.
* Add RQ for secret/decrypted values of secrets.
* Add RQ queries/mutations for pg-sodium keys.
* Use the new hook for decrypted value.
* Use the new hooks for pg sodium keys.
* Remove unneeded code from the vault store.
* Delete VaultStore and all usages of it.
* Small style fix
* Fix invalidation for create, update, delete secrets
* Small UI fixes to EditSecretModal
* Fix invalidation for pg-sodium-keys rq
* Add default error handler for pg sodium keys rq
* Undo
* Add default error handler for vault secrets RQ
* Remove observer on vault pages
* Fix database wrappers with vault
* Add loading state for vault keys
* fix pg sodium keys invalidation
* Opt for immutable const declaration in SecretsManagement
* remove keyId and keyName context from ColumnEditor, no longer supports TLE
* Address PR comments
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Fix new role form
* Rewrite form
* Commit a sin against ts
* Make the afterLabel a ReactNode.
* Fix minor type issues.
* Fix type
* Types
* Use lodash sortBy instead of the mutating array.sort.
* Fix the order of the roles with active connections.
* Sort the roles by lowercased names.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Sort by name
* Not name
* Fix
* Migrate the table query to use the new fetchers.
* Cleanup
* Cleanup
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Alpha sort db functions, triggers and indexes tables
* Use lowercased names when sorting.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Init RQ for database roles
* Shift all use of roles from pg meta mobx store to RQ
* Deprecate and remove roles pg meta mobx store
* Fix import
* Fix
* Address comments
* remove function child
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>