Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Standalone Storage Service
Base migrations are now part of the service.
Storage can now be run as a fully standalone service.
Fully decoupled from auth,realtime,postgrest
Notable changes
Migrations
Added a new migration
0002-storage-schema.sql
To keep backward compatibility and not break self-hosted instances the migration tool is now able to "refresh" the
migrations
table if it detects that the newly created migration is not present in themigrations
records.This refreshing mechanism only takes place for projects that have already run the migrations at least once.
New installations and new projects will start fresh and don't need to refresh
Granular Roles
Introduced 4 new environment variables for new installations
DB_ANON_ROLE
defaultanon
DB_SERVICE_ROLE
defaultservice_role
DB_AUTHENTICATED_ROLE
defaultauthenticated
DB_INSTALL_ROLES
defaulttrue
DB_SUPER_USER
defaultsupabase_storage_admin
DB_SEARCH_PATH
default ''If these roles are already present in the database we can simply pass
DB_INSTALL_ROLES=false
and the migration will not install these roles