Manage schema updates with Schema Viewer
In the Prisma Data Platform, you can use Schema Viewer to:
- view the contents of the Prisma schema file for the currently selected environment of a Prisma project
- manage how the Prisma schema is linked and updated for the currently selected environment
About Schema Viewer
After you create a project, Schema Viewer can show different options and these depend on whether you enabled schema synchronization and whether the database was empty.
- Projects with schema synchronization. For such projects, Schema Viewer shows the latest version of your Prisma schema with details about the GitHub repository and branch and the time when the schema was last updated. This means that when you created your project or after that, you enabled schema synchronization from GitHub and the platform can automatically read the updates of the
schema.prisma
file and keep that up-to-date in Schema Viewer. - Projects with an introspected schema. For such projects, Schema Viewer shows the Prisma schema from when the platform last introspected your database. For such projects, you can manually trigger a new introspection and you can also decide to enable schema synchronization from GitHub.
- Projects without a schema. Such projects had an empty database (no models or collections) when you created the project and Schema Viewer provides the option to enable schema synchronization or manually trigger a new introspection.
Projects with schema synchronization
When you have schema synchronization enabled for your project, Schema Viewer shows the contents of the most recent version of your Prisma schema file as synced from the GitHub repository and branch for the currently selected project environment.
You can view information about:
- GitHub repository and branch
- last time the Prisma schema was synchronized in the platform
- Prisma schema file path

When you push a new version of Prisma schema to the relevant GitHub repository and branch, the platform detects the change and updates the schema. This keeps the contents in Schema Viewer up-to-date and updates the models in Data Browser and Query Console so that you and your team always work with the latest models and attributes in your database.
Projects with an introspected schema
If you create a project with a database that contains some models and data and do not enable schema synchronization, the platform introspects the database and generates a Prisma schema for the project.
For such projects, Schema Viewer shows the generated Prisma schema at the bottom and provides the option to enable schema synchronization at the top.
If you do not plan to enable schema synchronization from a GitHub repository for the project, you can work with the generated Prisma schema at the bottom. If you have made changes to your database after the platform first introspected it, you can start a new introspection when you click Refresh Schema. With this action, the platform introspects your database again and generates and updates the Prisma schema in Schema Viewer.

Upload a schema file
If the schema refresh fails, an error notification pops up at the top of the page with the option to upload a schema file.
Click the upload a schema link in the notification. Below the Provide a schema section, a new Upload a Prisma schema file section is enabled. You can either:
- Click on the drop zone to open your file manager and select your schema
- Drag and drop your schema file to the drop zone
Review the contents of the schema file in the drop zone and once you are done, click Upload file

Projects without a schema
If introspection fails during project creation and you chose to skip providing a schema, your project exist without an associated schema.
For such projects, Schema Viewer does not show a schema and provides the option to link a Prisma schema from a GitHub repository or to manually trigger a new introspection.

The Data Browser and Query Console remain disabled until you enable schema synchronization or manually re-trigger a new introspection.
Enable schema synchronization
For projects without a schema or with an introspected schema, you can enable automated schema synchronization with the provided options.
Prerequisites
To enable schema synchronization from GitHub, you must be the Project owner or have the Admin role.
Steps
- From GitHub Account, select a GitHub account or organization.
- From Repository, select a repository.
- From Branch, select the branch that you want to use for the currently selected environment.
- (Optional) If you have a non-default path for your Prisma schema, define that in Prisma schema path.
- Click Link Prisma schema.

Result
Your Prisma schema is now linked to your current project environment.
Data Browser and Query Console are now active and you and your team members can now use them.