sailfork / t3code-github / .repos/ alchemy-effect/ examples/ prisma-tanstack-start/ migrations/ snapshots/ f32b3c3cf6335c4b528aa6d8233d0d9ffa0a87cd175963c0b6665ccebcf99793/ contract.json

{
  "_generated": {
    "message": "This file is automatically generated by \"prisma contract emit\".",
    "regenerate": "To regenerate, run: prisma contract emit",
    "warning": "⚠️  GENERATED FILE - DO NOT EDIT"
  },
  "capabilities": {
    "postgres": {
      "distinctOn": true,
      "jsonAgg": true,
      "lateral": true,
      "limit": true,
      "orderBy": true,
      "returning": true
    },
    "sql": {
      "checkConstraint": true,
      "defaultInInsert": true,
      "enums": true,
      "lateral": true,
      "returning": true,
      "scalarList": true
    }
  },
  "domain": {
    "namespaces": {
      "public": {
        "models": {
          "Post": {
            "fields": {
              "createdAt": {
                "nullable": false,
                "type": { "codecId": "pg/timestamptz-temporal@1", "kind": "scalar" }
              },
              "excerpt": {
                "nullable": false,
                "type": { "codecId": "pg/text@1", "kind": "scalar" }
              },
              "id": { "nullable": false, "type": { "codecId": "pg/text@1", "kind": "scalar" } },
              "title": { "nullable": false, "type": { "codecId": "pg/text@1", "kind": "scalar" } },
              "userId": { "nullable": false, "type": { "codecId": "pg/text@1", "kind": "scalar" } }
            },
            "relations": {
              "user": {
                "cardinality": "N:1",
                "nullable": false,
                "on": { "localFields": ["userId"], "targetFields": ["id"] },
                "to": { "model": "User", "namespace": "public" }
              }
            },
            "storage": {
              "fields": {
                "createdAt": { "column": "createdAt" },
                "excerpt": { "column": "excerpt" },
                "id": { "column": "id" },
                "title": { "column": "title" },
                "userId": { "column": "userId" }
              },
              "namespaceId": "public",
              "table": "post"
            }
          },
          "User": {
            "fields": {
              "createdAt": {
                "nullable": false,
                "type": { "codecId": "pg/timestamptz-temporal@1", "kind": "scalar" }
              },
              "email": { "nullable": false, "type": { "codecId": "pg/text@1", "kind": "scalar" } },
              "id": { "nullable": false, "type": { "codecId": "pg/text@1", "kind": "scalar" } },
              "name": { "nullable": false, "type": { "codecId": "pg/text@1", "kind": "scalar" } }
            },
            "relations": {
              "posts": {
                "cardinality": "1:N",
                "on": { "localFields": ["id"], "targetFields": ["userId"] },
                "to": { "model": "Post", "namespace": "public" }
              }
            },
            "storage": {
              "fields": {
                "createdAt": { "column": "createdAt" },
                "email": { "column": "email" },
                "id": { "column": "id" },
                "name": { "column": "name" }
              },
              "namespaceId": "public",
              "table": "user"
            }
          }
        }
      }
    }
  },
  "execution": {
    "executionHash": "1ff963fbab83b7266b283d62c8b49c9850cb57c65ea29fe44077380cee559199",
    "mutations": {
      "defaults": [
        {
          "onCreate": { "id": "uuidv4", "kind": "generator" },
          "ref": { "column": "id", "namespace": "public", "table": "post" }
        },
        {
          "onCreate": { "id": "uuidv4", "kind": "generator" },
          "ref": { "column": "id", "namespace": "public", "table": "user" }
        }
      ]
    }
  },
  "extensions": {},
  "meta": {},
  "profileHash": "3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2",
  "roots": {
    "post": { "model": "Post", "namespace": "public" },
    "user": { "model": "User", "namespace": "public" }
  },
  "schemaVersion": "1",
  "storage": {
    "namespaces": {
      "public": {
        "entries": {
          "table": {
            "post": {
              "columns": {
                "createdAt": {
                  "codecId": "pg/timestamptz-temporal@1",
                  "default": { "expression": "now()", "kind": "function" },
                  "nativeType": "timestamptz",
                  "nullable": false
                },
                "excerpt": { "codecId": "pg/text@1", "nativeType": "text", "nullable": false },
                "id": { "codecId": "pg/text@1", "nativeType": "text", "nullable": false },
                "title": { "codecId": "pg/text@1", "nativeType": "text", "nullable": false },
                "userId": { "codecId": "pg/text@1", "nativeType": "text", "nullable": false }
              },
              "foreignKeys": [
                {
                  "source": { "columns": ["userId"], "namespaceId": "public", "tableName": "post" },
                  "target": { "columns": ["id"], "namespaceId": "public", "tableName": "user" }
                }
              ],
              "indexes": [
                {
                  "columns": ["userId"],
                  "name": "post_userId_idx_a489d58a",
                  "prefix": "post_userId_idx",
                  "unique": false
                }
              ],
              "primaryKey": { "columns": ["id"] },
              "uniques": []
            },
            "user": {
              "columns": {
                "createdAt": {
                  "codecId": "pg/timestamptz-temporal@1",
                  "default": { "expression": "now()", "kind": "function" },
                  "nativeType": "timestamptz",
                  "nullable": false
                },
                "email": { "codecId": "pg/text@1", "nativeType": "text", "nullable": false },
                "id": { "codecId": "pg/text@1", "nativeType": "text", "nullable": false },
                "name": { "codecId": "pg/text@1", "nativeType": "text", "nullable": false }
              },
              "foreignKeys": [],
              "indexes": [],
              "primaryKey": { "columns": ["id"] },
              "uniques": []
            }
          }
        },
        "id": "public",
        "kind": "postgres-schema"
      }
    },
    "storageHash": "f32b3c3cf6335c4b528aa6d8233d0d9ffa0a87cd175963c0b6665ccebcf99793"
  },
  "target": "postgres",
  "targetFamily": "sql"
}