{
  "version": "6",
  "dialect": "sqlite",
  "id": "81c25bb4-e324-423e-b408-fb88b613ed39",
  "prevId": "9720cee3-e57f-4dae-85fa-986575d09f70",
  "tables": {
    "kv": {
      "name": "kv",
      "columns": {
        "encoded_key": {
          "name": "encoded_key",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {
        "idx_kv_encoded_key": {
          "name": "idx_kv_encoded_key",
          "columns": ["encoded_key"],
          "isUnique": false
        },
        "idx_kv_expires_at": {
          "name": "idx_kv_expires_at",
          "columns": ["expires_at"],
          "isUnique": false
        },
        "idx_kv_encoded_key_expires_at": {
          "name": "idx_kv_encoded_key_expires_at",
          "columns": ["encoded_key", "expires_at"],
          "isUnique": false
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "entities_relations": {
      "name": "entities_relations",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "project_id": {
          "name": "project_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "source_key": {
          "name": "source_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "source_id": {
          "name": "source_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "source_version": {
          "name": "source_version",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "source_revision": {
          "name": "source_revision",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "source_to_target_relation": {
          "name": "source_to_target_relation",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "target_key": {
          "name": "target_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "target_id": {
          "name": "target_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "target_version": {
          "name": "target_version",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "target_revision": {
          "name": "target_revision",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "target_to_source_relation": {
          "name": "target_to_source_relation",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "source_file": {
          "name": "source_file",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "file_hash": {
          "name": "file_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {
        "idx_entities_relations_source_key": {
          "name": "idx_entities_relations_source_key",
          "columns": ["source_key"],
          "isUnique": false
        },
        "idx_entities_relations_target_key": {
          "name": "idx_entities_relations_target_key",
          "columns": ["target_key"],
          "isUnique": false
        },
        "idx_entities_relations_source_target": {
          "name": "idx_entities_relations_source_target",
          "columns": ["source_to_target_relation"],
          "isUnique": false
        },
        "idx_entities_relations_target_source": {
          "name": "idx_entities_relations_target_source",
          "columns": ["target_to_source_relation"],
          "isUnique": false
        },
        "idx_entities_relations_unique": {
          "name": "idx_entities_relations_unique",
          "columns": [
            "source_key",
            "target_key",
            "source_version",
            "target_version",
            "source_revision",
            "target_revision"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "entities": {
      "name": "entities",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "project_id": {
          "name": "project_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tags": {
          "name": "tags",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "metadata": {
          "name": "metadata",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "git": {
          "name": "git",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "contact": {
          "name": "contact",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "links": {
          "name": "links",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "source": {
          "name": "source",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": "'file'"
        },
        "source_file": {
          "name": "source_file",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "file_hash": {
          "name": "file_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "version": {
          "name": "version",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "revision": {
          "name": "revision",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "hash": {
          "name": "hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "is_current": {
          "name": "is_current",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": true
        },
        "is_default_version": {
          "name": "is_default_version",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": false
        }
      },
      "indexes": {
        "idx_entities_type": {
          "name": "idx_entities_type",
          "columns": ["type"],
          "isUnique": false
        },
        "idx_entities_hash": {
          "name": "idx_entities_hash",
          "columns": ["hash"],
          "isUnique": false
        },
        "idx_entities_key_source_created_at": {
          "name": "idx_entities_key_source_created_at",
          "columns": ["key", "created_at"],
          "isUnique": false
        },
        "idx_entities_key_source_is_current": {
          "name": "idx_entities_key_source_is_current",
          "columns": ["key", "is_current"],
          "isUnique": false
        },
        "idx_entities_key_source_is_default": {
          "name": "idx_entities_key_source_is_default",
          "columns": ["key", "is_default_version"],
          "isUnique": false
        },
        "idx_entities_key_source": {
          "name": "idx_entities_key_source",
          "columns": ["key", "source", "revision", "version"],
          "isUnique": true
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    }
  },
  "views": {},
  "enums": {},
  "_meta": {
    "schemas": {},
    "tables": {},
    "columns": {}
  },
  "internal": {
    "indexes": {}
  }
}
