Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

SQLITE_CONSTRAINT: NOT NULL constraint failed #15

@dawnerd

Description

@dawnerd

Running Mongo -> Sql

[Error: insert into `haunts` (`Name`, `Slug`, `created_at`, `id`, `updated_at`) values ('SeaWorld San Diego’s Howl-O-Scream', 'sea-world-san-diego-s-howl-o-scream', '2021-03-14 22:04:41.060', 1, '2021-03-14 22:06:44.220') - SQLITE_CONSTRAINT: NOT NULL constraint failed: haunts.CurrentlyOperating] {
  errno: 19,
  code: 'SQLITE_CONSTRAINT'
}

Schema for that:

{
  "kind": "collectionType",
  "collectionName": "haunts",
  "info": {
    "name": "Haunts",
    "description": ""
  },
  "options": {
    "increments": true,
    "timestamps": true,
    "draftAndPublish": false
  },
  "attributes": {
    "Name": {
      "type": "string",
      "required": true
    },
    "Slug": {
      "type": "uid",
      "targetField": "Name",
      "required": true
    },
    "AlternativeNames": {
      "type": "component",
      "repeatable": true,
      "component": "common.alternative-names"
    },
    "CurrentlyOperating": {
      "type": "boolean",
      "default": true,
      "required": true
    },
    "Geo": {
      "type": "json"
    },
    "IsTempClosed": {
      "type": "boolean",
      "default": false,
      "required": true
    },
    "Park": {
      "model": "parks"
    },
    "NiceName": {
      "type": "string"
    },
    "MainPhoto": {
      "model": "file",
      "via": "related",
      "allowedTypes": [
        "images"
      ],
      "plugin": "upload",
      "required": false
    },
    "CoverPhoto": {
      "model": "file",
      "via": "related",
      "allowedTypes": [
        "images"
      ],
      "plugin": "upload",
      "required": false
    },
    "Gallery": {
      "collection": "file",
      "via": "related",
      "allowedTypes": [
        "images"
      ],
      "plugin": "upload",
      "required": false
    },
    "Sections": {
      "type": "dynamiczone",
      "components": [
        "text.section-header",
        "text.text"
      ]
    },
    "Region": {
      "model": "regions",
      "via": "Haunts"
    },
    "OpeningDate": {
      "type": "string"
    },
    "ClosedDate": {
      "type": "string"
    },
    "HauntYears": {
      "via": "Haunt",
      "collection": "haunt-years"
    },
    "Attribute": {
      "type": "component",
      "repeatable": true,
      "component": "attraction.attribute"
    }
  }
}

Metadata

Metadata

Labels

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions