Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 1.11 KB

steps.md

File metadata and controls

54 lines (34 loc) · 1.11 KB

Migration steps

You can find the implementation of the migration steps here and learn more about their behavior in the tests here.

Step types

CreateModel

Properties

  • name (string): The name of the new model.
  • embedded (boolean): Specifies whether the model is an embedded type.
  • db_name (string, optional): TBD

Examples

Adding a new model

Assume the following model is added to the datamodel:

model User {
  id: Int @id
  name: String?
}

This generates the following migration step of type CreateModel:

{
  "stepType": "CreateModel",
  "name": "User",
  "embedded": false
}

The generated steps of other step types are omitted for brevity.

UpdateModel

DeleteModel

CreateField

UpdateField

DeleteField

CreateEnum

UpdateEnum

DeleteEnum