github prisma/prisma1 1.6.1
Prisma 1.6.1 (2018-04-17)

latest releases: 1.34.12, 1.34.11, 1.34.10...
6 years ago

Fixes

Subscription fixes

We fixed an issue that caused most subscriptions to not fire at all. #1734

Breaking Change

Warnings & --force flag

Prisma now protects you from changes that may cause data loss or that may let your project end up in an inconsistent state.
In order to do this Prisma will validate changes made to your project structure during a deploy against the current structure and data of your project.
It will then generate warnings in cases where you might lose data. In cases where you would end up in an inconsistent state afterwards it will generate errors and refuse to deploy. In these cases you usually need to advance in steps towards your desired state. We'll explain the different warnings and errors in more detail further down below.

Warnings signal potential data loss. For performance reasons we do not check whether fields actually contain data before generating warnings but check only if there are nodes for their models. So if you are sure that fields do not contain data or you do not mind losing their content, you can overwrite using the force flag in the CLI. Prisma will then go ahead and deploy the changes and the data will be lost.

Warnings

  • Deleting a model when there are already nodes for it.
  • Deleting a field when there are already nodes for it's model.
  • Updating a field and changing it's cardinality / type / going from or to being a relation field when there are already nodes for its model.

Errors

  • Creating a required field when there are existing nodes
    • You need to first create it as optional and then set a value for the field for all nodes before updating to required
  • Updating a field to required when there are existing nodes without a value for that field
    • You need to set a value for the field for all nodes
  • Updating an enum to remove cases which are already in use on existing nodes
    • You need to remove all usages of the removed values before updating the enum

These cases apply to scalar fields and relation fields alike.

Don't miss a new prisma1 release

NewReleases is sending notifications on new releases.