Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dmzza/c16570daf0d54f7f3eafb1023d00238d to your computer and use it in GitHub Desktop.
Save dmzza/c16570daf0d54f7f3eafb1023d00238d to your computer and use it in GitHub Desktop.
Error running prisma2 lift up

Failed calculateDatabaseSteps at 2020-01-19T08:22:01.460Z

RPC One-Liner

{"id":2,"jsonrpc":"2.0","method":"calculateDatabaseSteps","params":{"projectInfo":"","assumeToBeApplied":[],"stepsToApply":[{"tag":"CreateSource","source":"db"},{"tag":"CreateArgument","location":{"tag":"Source","source":"db"},"argument":"provider","value":"\"sqlite\""},{"tag":"CreateArgument","location":{"tag":"Source","source":"db"},"argument":"url","value":"\"file:dev.db\""},{"tag":"CreateModel","model":"User"},{"tag":"CreateField","model":"User","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"User","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"User","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"User","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"User","field":"email","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"User","field":"email"},"directive":"unique"}},{"tag":"CreateModel","model":"ChosenPreset"},{"tag":"CreateField","model":"ChosenPreset","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"ChosenPreset","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"ChosenPreset","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"ChosenPreset","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"ChosenPreset","field":"createdAt","type":"DateTime","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"ChosenPreset","field":"createdAt"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"ChosenPreset","field":"createdAt"},"directive":"default"},"argument":"","value":"now()"},{"tag":"CreateField","model":"ChosenPreset","field":"updatedAt","type":"DateTime","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"ChosenPreset","field":"updatedAt"},"directive":"updatedAt"}},{"tag":"CreateField","model":"ChosenPreset","field":"position","type":"Position","arity":"Optional"},{"tag":"CreateField","model":"ChosenPreset","field":"text","type":"Text","arity":"Optional"},{"tag":"CreateModel","model":"Design"},{"tag":"CreateField","model":"Design","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Design","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Design","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Design","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"Design","field":"createdAt","type":"DateTime","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Design","field":"createdAt"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Design","field":"createdAt"},"directive":"default"},"argument":"","value":"now()"},{"tag":"CreateField","model":"Design","field":"updatedAt","type":"DateTime","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Design","field":"updatedAt"},"directive":"updatedAt"}},{"tag":"CreateField","model":"Design","field":"backgroundColor","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Design","field":"backgroundColor"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Design","field":"backgroundColor"},"directive":"default"},"argument":"","value":"\"rgb(255,255,255,1.0)\""},{"tag":"CreateField","model":"Design","field":"chosenPresets","type":"ChosenPreset","arity":"List"},{"tag":"CreateModel","model":"Position"},{"tag":"CreateField","model":"Position","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Position","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Position","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Position","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"Position","field":"x","type":"Int","arity":"Required"},{"tag":"CreateField","model":"Position","field":"y","type":"Int","arity":"Required"},{"tag":"CreateField","model":"Position","field":"presets","type":"Preset","arity":"List"},{"tag":"CreateModel","model":"Text"},{"tag":"CreateField","model":"Text","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Text","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Text","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Text","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"Text","field":"firstLine","type":"String","arity":"Required"},{"tag":"CreateModel","model":"Preset"},{"tag":"CreateField","model":"Preset","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Preset","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Preset","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Preset","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"Preset","field":"componentName","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Preset","field":"componentName"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Preset","field":"componentName"},"directive":"default"},"argument":"","value":"\"single-line-preset\""},{"tag":"CreateField","model":"Preset","field":"fontSize","type":"Int","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Preset","field":"fontSize"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Preset","field":"fontSize"},"directive":"default"},"argument":"","value":"36"},{"tag":"CreateField","model":"Preset","field":"name","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Preset","field":"name"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Preset","field":"name"},"directive":"default"},"argument":"","value":"\"New Preset\""},{"tag":"CreateField","model":"Preset","field":"text","type":"Text","arity":"Optional"},{"tag":"CreateField","model":"Preset","field":"variations","type":"Variation","arity":"List"},{"tag":"CreateModel","model":"Variation"},{"tag":"CreateField","model":"Variation","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Variation","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Variation","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Variation","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"Variation","field":"fontFamily","type":"String","arity":"Required"},{"tag":"CreateField","model":"Variation","field":"foregroundColor","type":"String","arity":"Required"},{"tag":"CreateField","model":"Variation","field":"backgroundColor","type":"String","arity":"Optional"},{"tag":"CreateField","model":"Variation","field":"shadow","type":"Shadow","arity":"Optional"},{"tag":"CreateField","model":"Variation","field":"chosenPresets","type":"ChosenPreset","arity":"List"},{"tag":"CreateModel","model":"Shadow"},{"tag":"CreateField","model":"Shadow","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Shadow","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Shadow","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Shadow","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"Shadow","field":"blur","type":"Float","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Shadow","field":"blur"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Shadow","field":"blur"},"directive":"default"},"argument":"","value":"1.0"},{"tag":"CreateField","model":"Shadow","field":"color","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Shadow","field":"color"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Shadow","field":"color"},"directive":"default"},"argument":"","value":"\"rgba(0,0,0,0.5)\""},{"tag":"CreateField","model":"Shadow","field":"spread","type":"Float","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Shadow","field":"spread"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Shadow","field":"spread"},"directive":"default"},"argument":"","value":"0.0"},{"tag":"CreateField","model":"Shadow","field":"xOffset","type":"Float","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Shadow","field":"xOffset"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Shadow","field":"xOffset"},"directive":"default"},"argument":"","value":"0.0"},{"tag":"CreateField","model":"Shadow","field":"yOffset","type":"Float","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"Shadow","field":"yOffset"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"Shadow","field":"yOffset"},"directive":"default"},"argument":"","value":"1.0"}],"sourceConfig":"generator photon {\n  provider = \"photonjs\"\n}\n\ndatasource db {\n  provider = \"sqlite\"\n  url      = \"file:dev.db\"\n}\n\nmodel User {\n  id    String  @default(cuid()) @id\n  email String  @unique\n}\n\nmodel ChosenPreset {\n  id        String    @default(cuid()) @id\n  createdAt DateTime  @default(now())\n  updatedAt DateTime  @updatedAt\n  position  Position? // @relation(onDelete: CASCADE) waiting for prisma2#267\n  text      Text?     // @relation(onDelete: CASCADE)\n}\n\nmodel Design {\n  id              String          @default(cuid()) @id\n  createdAt       DateTime        @default(now())\n  updatedAt       DateTime        @updatedAt\n  backgroundColor String          @default(\"rgb(255,255,255,1.0)\")\n  chosenPresets   ChosenPreset[]\n  userId          String\n}\n\nmodel Position {\n  id      String    @default(cuid()) @id\n  x       Int\n  y       Int\n  presets Preset[]\n}\n\nmodel Text {\n  id          String  @default(cuid()) @id\n  firstLine   String\n}\n\nmodel Preset {\n  id              String        @default(cuid()) @id\n  componentName   String        @default(\"single-line-preset\")\n  fontSize        Int           @default(36)\n  name            String        @default(\"New Preset\")\n  text            Text?\n  variations      Variation[]\n}\n\nmodel Variation {\n  id              String          @default(cuid()) @id\n  fontFamily      String\n  foregroundColor String\n  backgroundColor String?\n  shadow          Shadow?\n  chosenPresets   ChosenPreset[]\n}\n\nmodel Shadow {\n  id      String  @default(cuid()) @id\n  blur    Float   @default(1.0)\n  color   String  @default(\"rgba(0,0,0,0.5)\")\n  spread  Float   @default(0.0)\n  xOffset Float   @default(0.0)\n  yOffset Float   @default(1.0)\n}"}}

RPC Input Readable

{
  "id": 2,
  "jsonrpc": "2.0",
  "method": "calculateDatabaseSteps",
  "params": {
    "projectInfo": "",
    "assumeToBeApplied": [],
    "stepsToApply": [
      {
        "tag": "CreateSource",
        "source": "db"
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Source",
          "source": "db"
        },
        "argument": "provider",
        "value": "\"sqlite\""
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Source",
          "source": "db"
        },
        "argument": "url",
        "value": "\"file:dev.db\""
      },
      {
        "tag": "CreateModel",
        "model": "User"
      },
      {
        "tag": "CreateField",
        "model": "User",
        "field": "id",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "User",
            "field": "id"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "User",
            "field": "id"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "cuid()"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "User",
            "field": "id"
          },
          "directive": "id"
        }
      },
      {
        "tag": "CreateField",
        "model": "User",
        "field": "email",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "User",
            "field": "email"
          },
          "directive": "unique"
        }
      },
      {
        "tag": "CreateModel",
        "model": "ChosenPreset"
      },
      {
        "tag": "CreateField",
        "model": "ChosenPreset",
        "field": "id",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "ChosenPreset",
            "field": "id"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "ChosenPreset",
            "field": "id"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "cuid()"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "ChosenPreset",
            "field": "id"
          },
          "directive": "id"
        }
      },
      {
        "tag": "CreateField",
        "model": "ChosenPreset",
        "field": "createdAt",
        "type": "DateTime",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "ChosenPreset",
            "field": "createdAt"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "ChosenPreset",
            "field": "createdAt"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "now()"
      },
      {
        "tag": "CreateField",
        "model": "ChosenPreset",
        "field": "updatedAt",
        "type": "DateTime",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "ChosenPreset",
            "field": "updatedAt"
          },
          "directive": "updatedAt"
        }
      },
      {
        "tag": "CreateField",
        "model": "ChosenPreset",
        "field": "position",
        "type": "Position",
        "arity": "Optional"
      },
      {
        "tag": "CreateField",
        "model": "ChosenPreset",
        "field": "text",
        "type": "Text",
        "arity": "Optional"
      },
      {
        "tag": "CreateModel",
        "model": "Design"
      },
      {
        "tag": "CreateField",
        "model": "Design",
        "field": "id",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Design",
            "field": "id"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Design",
            "field": "id"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "cuid()"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Design",
            "field": "id"
          },
          "directive": "id"
        }
      },
      {
        "tag": "CreateField",
        "model": "Design",
        "field": "createdAt",
        "type": "DateTime",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Design",
            "field": "createdAt"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Design",
            "field": "createdAt"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "now()"
      },
      {
        "tag": "CreateField",
        "model": "Design",
        "field": "updatedAt",
        "type": "DateTime",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Design",
            "field": "updatedAt"
          },
          "directive": "updatedAt"
        }
      },
      {
        "tag": "CreateField",
        "model": "Design",
        "field": "backgroundColor",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Design",
            "field": "backgroundColor"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Design",
            "field": "backgroundColor"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "\"rgb(255,255,255,1.0)\""
      },
      {
        "tag": "CreateField",
        "model": "Design",
        "field": "chosenPresets",
        "type": "ChosenPreset",
        "arity": "List"
      },
      {
        "tag": "CreateModel",
        "model": "Position"
      },
      {
        "tag": "CreateField",
        "model": "Position",
        "field": "id",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Position",
            "field": "id"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Position",
            "field": "id"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "cuid()"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Position",
            "field": "id"
          },
          "directive": "id"
        }
      },
      {
        "tag": "CreateField",
        "model": "Position",
        "field": "x",
        "type": "Int",
        "arity": "Required"
      },
      {
        "tag": "CreateField",
        "model": "Position",
        "field": "y",
        "type": "Int",
        "arity": "Required"
      },
      {
        "tag": "CreateField",
        "model": "Position",
        "field": "presets",
        "type": "Preset",
        "arity": "List"
      },
      {
        "tag": "CreateModel",
        "model": "Text"
      },
      {
        "tag": "CreateField",
        "model": "Text",
        "field": "id",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Text",
            "field": "id"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Text",
            "field": "id"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "cuid()"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Text",
            "field": "id"
          },
          "directive": "id"
        }
      },
      {
        "tag": "CreateField",
        "model": "Text",
        "field": "firstLine",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateModel",
        "model": "Preset"
      },
      {
        "tag": "CreateField",
        "model": "Preset",
        "field": "id",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "id"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "id"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "cuid()"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "id"
          },
          "directive": "id"
        }
      },
      {
        "tag": "CreateField",
        "model": "Preset",
        "field": "componentName",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "componentName"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "componentName"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "\"single-line-preset\""
      },
      {
        "tag": "CreateField",
        "model": "Preset",
        "field": "fontSize",
        "type": "Int",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "fontSize"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "fontSize"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "36"
      },
      {
        "tag": "CreateField",
        "model": "Preset",
        "field": "name",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "name"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Preset",
            "field": "name"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "\"New Preset\""
      },
      {
        "tag": "CreateField",
        "model": "Preset",
        "field": "text",
        "type": "Text",
        "arity": "Optional"
      },
      {
        "tag": "CreateField",
        "model": "Preset",
        "field": "variations",
        "type": "Variation",
        "arity": "List"
      },
      {
        "tag": "CreateModel",
        "model": "Variation"
      },
      {
        "tag": "CreateField",
        "model": "Variation",
        "field": "id",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Variation",
            "field": "id"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Variation",
            "field": "id"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "cuid()"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Variation",
            "field": "id"
          },
          "directive": "id"
        }
      },
      {
        "tag": "CreateField",
        "model": "Variation",
        "field": "fontFamily",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateField",
        "model": "Variation",
        "field": "foregroundColor",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateField",
        "model": "Variation",
        "field": "backgroundColor",
        "type": "String",
        "arity": "Optional"
      },
      {
        "tag": "CreateField",
        "model": "Variation",
        "field": "shadow",
        "type": "Shadow",
        "arity": "Optional"
      },
      {
        "tag": "CreateField",
        "model": "Variation",
        "field": "chosenPresets",
        "type": "ChosenPreset",
        "arity": "List"
      },
      {
        "tag": "CreateModel",
        "model": "Shadow"
      },
      {
        "tag": "CreateField",
        "model": "Shadow",
        "field": "id",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "id"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "id"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "cuid()"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "id"
          },
          "directive": "id"
        }
      },
      {
        "tag": "CreateField",
        "model": "Shadow",
        "field": "blur",
        "type": "Float",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "blur"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "blur"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "1.0"
      },
      {
        "tag": "CreateField",
        "model": "Shadow",
        "field": "color",
        "type": "String",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "color"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "color"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "\"rgba(0,0,0,0.5)\""
      },
      {
        "tag": "CreateField",
        "model": "Shadow",
        "field": "spread",
        "type": "Float",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "spread"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "spread"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "0.0"
      },
      {
        "tag": "CreateField",
        "model": "Shadow",
        "field": "xOffset",
        "type": "Float",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "xOffset"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "xOffset"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "0.0"
      },
      {
        "tag": "CreateField",
        "model": "Shadow",
        "field": "yOffset",
        "type": "Float",
        "arity": "Required"
      },
      {
        "tag": "CreateDirective",
        "location": {
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "yOffset"
          },
          "directive": "default"
        }
      },
      {
        "tag": "CreateArgument",
        "location": {
          "tag": "Directive",
          "path": {
            "tag": "Field",
            "model": "Shadow",
            "field": "yOffset"
          },
          "directive": "default"
        },
        "argument": "",
        "value": "1.0"
      }
    ],
    "sourceConfig": "generator photon {\n  provider = \"photonjs\"\n}\n\ndatasource db {\n  provider = \"sqlite\"\n  url      = \"file:dev.db\"\n}\n\nmodel User {\n  id    String  @default(cuid()) @id\n  email String  @unique\n}\n\nmodel ChosenPreset {\n  id        String    @default(cuid()) @id\n  createdAt DateTime  @default(now())\n  updatedAt DateTime  @updatedAt\n  position  Position? // @relation(onDelete: CASCADE) waiting for prisma2#267\n  text      Text?     // @relation(onDelete: CASCADE)\n}\n\nmodel Design {\n  id              String          @default(cuid()) @id\n  createdAt       DateTime        @default(now())\n  updatedAt       DateTime        @updatedAt\n  backgroundColor String          @default(\"rgb(255,255,255,1.0)\")\n  chosenPresets   ChosenPreset[]\n  userId          String\n}\n\nmodel Position {\n  id      String    @default(cuid()) @id\n  x       Int\n  y       Int\n  presets Preset[]\n}\n\nmodel Text {\n  id          String  @default(cuid()) @id\n  firstLine   String\n}\n\nmodel Preset {\n  id              String        @default(cuid()) @id\n  componentName   String        @default(\"single-line-preset\")\n  fontSize        Int           @default(36)\n  name            String        @default(\"New Preset\")\n  text            Text?\n  variations      Variation[]\n}\n\nmodel Variation {\n  id              String          @default(cuid()) @id\n  fontFamily      String\n  foregroundColor String\n  backgroundColor String?\n  shadow          Shadow?\n  chosenPresets   ChosenPreset[]\n}\n\nmodel Shadow {\n  id      String  @default(cuid()) @id\n  blur    Float   @default(1.0)\n  color   String  @default(\"rgba(0,0,0,0.5)\")\n  spread  Float   @default(0.0)\n  xOffset Float   @default(0.0)\n  yOffset Float   @default(1.0)\n}"
  }
}

Stack Trace

[migration-engine/connectors/sql-migration-connector/src/sql_migration_persistence.rs:40] &sql_str = "CREATE TABLE IF NOT EXISTS \"lift\".\"_Migration\" (\"revision\" INTEGER NOT NULL PRIMARY KEY, \"name\" TEXT NOT NULL, \"datamodel\" TEXT NOT NULL, \"status\" TEXT NOT NULL, \"applied\" INTEGER NOT NULL, \"rolled_back\" INTEGER NOT NULL, \"datamodel_steps\" TEXT NOT NULL, \"database_migration\" TEXT NOT NULL, \"errors\" TEXT NOT NULL, \"started_at\" DATE NOT NULL, \"finished_at\" DATE);"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment