Migrating Away from Prisma 1 Cloud
FAQ
We released the Prisma ORM (i.e., Prisma 2) for production usage almost two years ago.
This new version of Prisma doesn't require developers to set up a proxy server (i.e., the Prisma server). It also comes with many additional benefits, such as an intuitive and expressive modeling language to declare your database models, a proper migration system, and full type-safety for all database queries. Learn more about the differences between Prisma 1 and the new Prisma ORM here.
Today, we have hundreds of thousands of developers using the Prisma ORM. In addition, our team is building the next generation of database tools for development teams and organizations: the Prisma Data Platform.
🚨 Due to Prisma's new focus on the open-source ORM and the Prisma Data Platform, we will officially sunset Prisma 1 Cloud on September 1st, 2022
Migration Steps
- Identify which features of Prisma 1 Cloud your application is using.
- Create a plan based on your specific use case and migrate.
- Close your Prisma 1 Cloud account, or please notify us.
Step 1: Identify Features
Prisma 1 Cloud
First, identify if you're using Prisma 1 Cloud at all!
- Open your project locally.
- Inspect
prisma.yml
and any environment variables your build process is using. - If your project uses a
PRISMA_MANAGEMENT_API_SECRET
, then you are not using Prisma 1 Cloud. You can verify this by usingprisma1 logout
from the command line, regenerating your Prisma 1 client, and attempting to deploy or access a service.
Servers
Servers made it possible to self-host Prisma 1 and maintain ownership of your data while still using Prisma 1 Cloud. Verify if you had configured custom servers:
- Log in at https://app.prisma.io.
- Navigate to the Servers tab at the top of the screen.
- You have configured custom servers if you see more than two entries,
prisma-eu1
, andprisma-us1
. - If you have configured custom servers, click on each and note the number of Services running and the Server and Database details.
- If your custom server has 0 Services running, Prisma 1 Cloud is not using it, and you can delete it from Prisma 1 Cloud by clicking the Delete Server button on the server details page.
Services
Services are discrete Prisma 1 endpoints that applications connect to, usually delineated by dev
or prod
environments. Note all Services in your account:
- Log in at https://app.prisma.io.
- Navigate to the Services tab at the top of the screen.
- Click into each service and note the details, including the Name, Stage (environment), and HTTP Endpoint.
Step 2: Create a Plan and Migrate
Upgrade or Self-host
If you're using Prisma 1 Cloud to host your Prisma server, you will need to migrate off before September 1st, 2022. You have a few options:
- Upgrade your application from Prisma 1 to Prisma ORM. In this case, you will no longer need Prisma 1 Cloud because Prisma ORM does not require a separate Prisma server.
- Self-host Prisma 1. While it is a viable option, we do not recommend self-hosting Prisma 1 as it is in maintenance mode, and Prisma will not develop new features or offer ongoing support for issues.
Upgrading to Prisma ORM
When upgrading to Prisma ORM, there are two general strategies:
- Upgrade all at once: Remove Prisma 1 from your project and move everything to Prisma ORM all at once.
- Side-by-side upgrade: Add Prisma ORM to an existing Prisma 1 project and gradually replace existing Prisma 1 features while running each side-by-side.
Learn more about how to upgrade, the main differences between Prisma 1 and Prisma ORM, and the Prisma upgrade CLI.
Self-hosting Prisma 1
We do not recommend self-hosting Prisma 1 as it is in maintenance mode, and Prisma will not develop new features or offer ongoing support for issues. The following are high-level steps for self-hosting if it is not feasible to upgrade your application to Prisma ORM in the time before the Prisma 1 Cloud sunset on September 1st, 2022.
Deploy a Prisma 1 Server to the hosting environment of your choice. Use the following tutorials as examples:
- Export your service data from Prisma 1 Cloud using
prisma1 export
or email us using the email address from your account with a list of the Services in your account that you would like us to back up. - Update the connection strings in your local
prisma.yml
file to point to the Prisma 1 Server created in Step 2, and import your service data. - Regression test your application in pre-production environments, then deploy the application with new connection strings to production.
Custom Servers
If your Prisma 1 Cloud implementation uses custom servers (see above in Step 1), you are already self-hosting Prisma 1.
- Verify that the
endpoint
property in yourprisma.yml
file references the custom server that you configured on the Prisma 1 Cloud Servers page. - Find your Management API Secret in your deployed service. For example, if you've deployed a service to Heroku, look at the Settings page and click Reveal Config Vars to find the
managementApiSecret
. - In your build process, validate that all
prisma1
CLI commands use aPRISMA_MANAGEMENT_API_SECRET
environment variable with the value found above. You can do this using the-e
flag or another package such asdotenv
. - Validate that the command works by using
prisma1 logout
in your console, regenerating your Prisma 1 client, and then attempting to deploy or otherwise access your service using the newly declared environment variables.
Data Browser
If you choose to self-host Prisma 1, you can access a similar data browser to the one currently found on Prisma 1 Cloud directly.
- Update the
endpoint
property in yourprisma.yml
file to point to the Prisma 1 server where you want to access the data browser. - In your command line from the same directory that the
prisma.yml
file is in, typeprisma1 admin
, and it should open up a browser to query data hosted right on the server itself. The general URL structure will look something like "https://ENDPOINT/_admin"
Request data
Any Prisma 1 Cloud implementations that do not use a Custom Server must migrate data to a new database.
- Identify if the Normalized Data Format (NDF) meets the needs of your application.
- If so, try using the Prisma 1 CLI
export
method. - If the Normalized Data Format doesn't meet your needs, send us an email using the email address from your account with a list of the Services in your account that you would like us to back up.
Step 3: Close Your Prisma 1 Cloud Account
After completing the migration off of Prisma 1 Cloud, close your account or send us an email:
- Log in to Prisma 1 Cloud.
- Verify that there are no production-facing services by visiting the Services tab.
- Click on the Account circle in the upper right-hand corner and click and confirm Delete Account at the bottom of the page.