Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prisma Lift error

Failed calculateDatabaseSteps at 2019-12-17T17:44:16.463Z

RPC One-Liner

{"id":3,"jsonrpc":"2.0","method":"calculateDatabaseSteps","params":{"projectInfo":"","assumeToBeApplied":[{"stepType":"CreateModel","model":"User"},{"stepType":"CreateField","model":"User","field":"id","type":"String","arity":"required"},{"stepType":"CreateDirective","model":"User","field":"id","directive":"default"},{"stepType":"CreateDirectiveArgument","model":"User","field":"id","directive":"default","argument":"","value":"cuid()"},{"stepType":"CreateDirective","model":"User","field":"id","directive":"id"},{"stepType":"CreateField","model":"User","field":"email","type":"String","arity":"required"},{"stepType":"CreateDirective","model":"User","field":"email","directive":"unique"},{"stepType":"CreateField","model":"User","field":"name","type":"String","arity":"optional"}],"stepsToApply":[{"stepType":"CreateModel","model":"User"},{"stepType":"CreateField","model":"User","field":"id","type":"String","arity":"required"},{"stepType":"CreateDirective","model":"User","field":"id","directive":"default"},{"stepType":"CreateDirectiveArgument","model":"User","field":"id","directive":"default","argument":"","value":"cuid()"},{"stepType":"CreateDirective","model":"User","field":"id","directive":"id"},{"stepType":"CreateField","model":"User","field":"email","type":"String","arity":"required"},{"stepType":"CreateDirective","model":"User","field":"email","directive":"unique"},{"stepType":"CreateField","model":"User","field":"name","type":"String","arity":"optional"},{"stepType":"CreateModel","model":"Post"},{"stepType":"CreateField","model":"Post","field":"id","type":"String","arity":"required"},{"stepType":"CreateDirective","model":"Post","field":"id","directive":"default"},{"stepType":"CreateDirectiveArgument","model":"Post","field":"id","directive":"default","argument":"","value":"cuid()"},{"stepType":"CreateDirective","model":"Post","field":"id","directive":"id"},{"stepType":"CreateField","model":"Post","field":"createdAt","type":"DateTime","arity":"required"},{"stepType":"CreateDirective","model":"Post","field":"createdAt","directive":"default"},{"stepType":"CreateDirectiveArgument","model":"Post","field":"createdAt","directive":"default","argument":"","value":"now()"},{"stepType":"CreateField","model":"Post","field":"updatedAt","type":"DateTime","arity":"required"},{"stepType":"CreateDirective","model":"Post","field":"updatedAt","directive":"updatedAt"},{"stepType":"CreateField","model":"Post","field":"published","type":"Boolean","arity":"required"},{"stepType":"CreateDirective","model":"Post","field":"published","directive":"default"},{"stepType":"CreateDirectiveArgument","model":"Post","field":"published","directive":"default","argument":"","value":"true"},{"stepType":"CreateField","model":"Post","field":"title","type":"String","arity":"required"},{"stepType":"CreateField","model":"Post","field":"content","type":"String","arity":"optional"},{"stepType":"CreateField","model":"Post","field":"author","type":"User","arity":"optional"}],"sourceConfig":"generator photon {\n  provider = \"photonjs\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = \"postgresql://postgres@localhost/mydb-prisma\"\n}\n\nmodel User {\n  id    String  @default(cuid()) @id\n  email String  @unique\n  name  String?\n}\n\nmodel Post {\n  id        String   @default(cuid()) @id\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n  published Boolean  @default(true)\n  title     String\n  content   String?\n  author    User?\n}"}}

RPC Input Readable

{
  "id": 3,
  "jsonrpc": "2.0",
  "method": "calculateDatabaseSteps",
  "params": {
    "projectInfo": "",
    "assumeToBeApplied": [
      {
        "stepType": "CreateModel",
        "model": "User"
      },
      {
        "stepType": "CreateField",
        "model": "User",
        "field": "id",
        "type": "String",
        "arity": "required"
      },
      {
        "stepType": "CreateDirective",
        "model": "User",
        "field": "id",
        "directive": "default"
      },
      {
        "stepType": "CreateDirectiveArgument",
        "model": "User",
        "field": "id",
        "directive": "default",
        "argument": "",
        "value": "cuid()"
      },
      {
        "stepType": "CreateDirective",
        "model": "User",
        "field": "id",
        "directive": "id"
      },
      {
        "stepType": "CreateField",
        "model": "User",
        "field": "email",
        "type": "String",
        "arity": "required"
      },
      {
        "stepType": "CreateDirective",
        "model": "User",
        "field": "email",
        "directive": "unique"
      },
      {
        "stepType": "CreateField",
        "model": "User",
        "field": "name",
        "type": "String",
        "arity": "optional"
      }
    ],
    "stepsToApply": [
      {
        "stepType": "CreateModel",
        "model": "User"
      },
      {
        "stepType": "CreateField",
        "model": "User",
        "field": "id",
        "type": "String",
        "arity": "required"
      },
      {
        "stepType": "CreateDirective",
        "model": "User",
        "field": "id",
        "directive": "default"
      },
      {
        "stepType": "CreateDirectiveArgument",
        "model": "User",
        "field": "id",
        "directive": "default",
        "argument": "",
        "value": "cuid()"
      },
      {
        "stepType": "CreateDirective",
        "model": "User",
        "field": "id",
        "directive": "id"
      },
      {
        "stepType": "CreateField",
        "model": "User",
        "field": "email",
        "type": "String",
        "arity": "required"
      },
      {
        "stepType": "CreateDirective",
        "model": "User",
        "field": "email",
        "directive": "unique"
      },
      {
        "stepType": "CreateField",
        "model": "User",
        "field": "name",
        "type": "String",
        "arity": "optional"
      },
      {
        "stepType": "CreateModel",
        "model": "Post"
      },
      {
        "stepType": "CreateField",
        "model": "Post",
        "field": "id",
        "type": "String",
        "arity": "required"
      },
      {
        "stepType": "CreateDirective",
        "model": "Post",
        "field": "id",
        "directive": "default"
      },
      {
        "stepType": "CreateDirectiveArgument",
        "model": "Post",
        "field": "id",
        "directive": "default",
        "argument": "",
        "value": "cuid()"
      },
      {
        "stepType": "CreateDirective",
        "model": "Post",
        "field": "id",
        "directive": "id"
      },
      {
        "stepType": "CreateField",
        "model": "Post",
        "field": "createdAt",
        "type": "DateTime",
        "arity": "required"
      },
      {
        "stepType": "CreateDirective",
        "model": "Post",
        "field": "createdAt",
        "directive": "default"
      },
      {
        "stepType": "CreateDirectiveArgument",
        "model": "Post",
        "field": "createdAt",
        "directive": "default",
        "argument": "",
        "value": "now()"
      },
      {
        "stepType": "CreateField",
        "model": "Post",
        "field": "updatedAt",
        "type": "DateTime",
        "arity": "required"
      },
      {
        "stepType": "CreateDirective",
        "model": "Post",
        "field": "updatedAt",
        "directive": "updatedAt"
      },
      {
        "stepType": "CreateField",
        "model": "Post",
        "field": "published",
        "type": "Boolean",
        "arity": "required"
      },
      {
        "stepType": "CreateDirective",
        "model": "Post",
        "field": "published",
        "directive": "default"
      },
      {
        "stepType": "CreateDirectiveArgument",
        "model": "Post",
        "field": "published",
        "directive": "default",
        "argument": "",
        "value": "true"
      },
      {
        "stepType": "CreateField",
        "model": "Post",
        "field": "title",
        "type": "String",
        "arity": "required"
      },
      {
        "stepType": "CreateField",
        "model": "Post",
        "field": "content",
        "type": "String",
        "arity": "optional"
      },
      {
        "stepType": "CreateField",
        "model": "Post",
        "field": "author",
        "type": "User",
        "arity": "optional"
      }
    ],
    "sourceConfig": "generator photon {\n  provider = \"photonjs\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = \"postgresql://postgres@localhost/mydb-prisma\"\n}\n\nmodel User {\n  id    String  @default(cuid()) @id\n  email String  @unique\n  name  String?\n}\n\nmodel Post {\n  id        String   @default(cuid()) @id\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n  published Boolean  @default(true)\n  title     String\n  content   String?\n  author    User?\n}"
  }
}

Stack Trace

Dec 17 18:44:16.384  INFO migration_engine: Starting migration engine RPC server git_hash="3c4da1d6caa0c40a0210a346ec982c77f74e18c7"
Dec 17 18:44:16.403  INFO quaint::single: Starting a postgresql pool with 1 connections.    
Dec 17 18:44:16.418  INFO ListMigrations: migration_engine::commands::list_migrations: Returning 0 migrations (0 pending).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.