{
  "id": "29efb237-271d-48ab-a44c-01b6740a41b3",
  "prevId": "b9c25bc5-9b50-4c79-9d55-5b4fbce169a1",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.api_keys": {
      "name": "api_keys",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "key_hash": {
          "name": "key_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "key_prefix": {
          "name": "key_prefix",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "scopes": {
          "name": "scopes",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[\"read\"]'::jsonb"
        },
        "last_used_at": {
          "name": "last_used_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "revoked_at": {
          "name": "revoked_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "api_keys_key_hash_key": {
          "name": "api_keys_key_hash_key",
          "columns": [
            {
              "expression": "key_hash",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "api_keys_user_idx": {
          "name": "api_keys_user_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "api_keys_user_id_users_id_fk": {
          "name": "api_keys_user_id_users_id_fk",
          "tableFrom": "api_keys",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.invites": {
      "name": "invites",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "code_hash": {
          "name": "code_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "team": {
          "name": "team",
          "type": "pig_team",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "role": {
          "name": "role",
          "type": "pig_team_role",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'member'"
        },
        "created_by_user_id": {
          "name": "created_by_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "uses_remaining": {
          "name": "uses_remaining",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 1
        },
        "scope_note": {
          "name": "scope_note",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "redeemed_by_user_id": {
          "name": "redeemed_by_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "redeemed_at": {
          "name": "redeemed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "revoked_at": {
          "name": "revoked_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "invites_code_hash_key": {
          "name": "invites_code_hash_key",
          "columns": [
            {
              "expression": "code_hash",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "invites_email_idx": {
          "name": "invites_email_idx",
          "columns": [
            {
              "expression": "email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "invites_created_by_user_id_users_id_fk": {
          "name": "invites_created_by_user_id_users_id_fk",
          "tableFrom": "invites",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "invites_redeemed_by_user_id_users_id_fk": {
          "name": "invites_redeemed_by_user_id_users_id_fk",
          "tableFrom": "invites",
          "tableTo": "users",
          "columnsFrom": [
            "redeemed_by_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.team_memberships": {
      "name": "team_memberships",
      "schema": "",
      "columns": {
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "team": {
          "name": "team",
          "type": "pig_team",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "pig_team_role",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'member'"
        },
        "is_primary": {
          "name": "is_primary",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "team_memberships_team_idx": {
          "name": "team_memberships_team_idx",
          "columns": [
            {
              "expression": "team",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "team_memberships_user_id_users_id_fk": {
          "name": "team_memberships_user_id_users_id_fk",
          "tableFrom": "team_memberships",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "team_memberships_user_id_team_pk": {
          "name": "team_memberships_user_id_team_pk",
          "columns": [
            "user_id",
            "team"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "auth_subject": {
          "name": "auth_subject",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "handle": {
          "name": "handle",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "avatar_url": {
          "name": "avatar_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "timezone": {
          "name": "timezone",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_platform_admin": {
          "name": "is_platform_admin",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "theme_mode": {
          "name": "theme_mode",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'system'"
        },
        "accent_color": {
          "name": "accent_color",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pig'"
        },
        "deactivated_at": {
          "name": "deactivated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "last_seen_at": {
          "name": "last_seen_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "users_auth_subject_key": {
          "name": "users_auth_subject_key",
          "columns": [
            {
              "expression": "auth_subject",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "users_email_key": {
          "name": "users_email_key",
          "columns": [
            {
              "expression": "email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "users_handle_key": {
          "name": "users_handle_key",
          "columns": [
            {
              "expression": "handle",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.account_stats": {
      "name": "account_stats",
      "schema": "",
      "columns": {
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true
        },
        "open_deals": {
          "name": "open_deals",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "contact_count": {
          "name": "contact_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "refreshed_at": {
          "name": "refreshed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "account_stats_account_id_accounts_id_fk": {
          "name": "account_stats_account_id_accounts_id_fk",
          "tableFrom": "account_stats",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.accounts": {
      "name": "accounts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "domain": {
          "name": "domain",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "website": {
          "name": "website",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "logo_url": {
          "name": "logo_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "side": {
          "name": "side",
          "type": "pig_account_side",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'demand'"
        },
        "supplier_type": {
          "name": "supplier_type",
          "type": "pig_supplier_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "customer_segment": {
          "name": "customer_segment",
          "type": "pig_customer_segment",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "country": {
          "name": "country",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "region": {
          "name": "region",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "jurisdiction": {
          "name": "jurisdiction",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ultimate_parent_account_id": {
          "name": "ultimate_parent_account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "ultimate_parent_name": {
          "name": "ultimate_parent_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ultimate_parent_country": {
          "name": "ultimate_parent_country",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ownership_verified_at": {
          "name": "ownership_verified_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "linkedin_url": {
          "name": "linkedin_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "twitter_url": {
          "name": "twitter_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "github_org": {
          "name": "github_org",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "owner_user_id": {
          "name": "owner_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "source": {
          "name": "source",
          "type": "pig_record_source",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'manual'"
        },
        "source_url": {
          "name": "source_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "confidence": {
          "name": "confidence",
          "type": "pig_confidence_grade",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'confirmed'"
        },
        "last_activity_at": {
          "name": "last_activity_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "archived_at": {
          "name": "archived_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "accounts_domain_key": {
          "name": "accounts_domain_key",
          "columns": [
            {
              "expression": "domain",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "accounts_side_idx": {
          "name": "accounts_side_idx",
          "columns": [
            {
              "expression": "side",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "accounts_owner_idx": {
          "name": "accounts_owner_idx",
          "columns": [
            {
              "expression": "owner_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "accounts_name_idx": {
          "name": "accounts_name_idx",
          "columns": [
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "accounts_owner_user_id_users_id_fk": {
          "name": "accounts_owner_user_id_users_id_fk",
          "tableFrom": "accounts",
          "tableTo": "users",
          "columnsFrom": [
            "owner_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.activities": {
      "name": "activities",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "type": {
          "name": "type",
          "type": "pig_activity_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "subject": {
          "name": "subject",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "contact_id": {
          "name": "contact_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "demand_deal_id": {
          "name": "demand_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "supply_deal_id": {
          "name": "supply_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "actor_user_id": {
          "name": "actor_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "actor_agent": {
          "name": "actor_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "occurred_at": {
          "name": "occurred_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "meta": {
          "name": "meta",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "external_id": {
          "name": "external_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "source": {
          "name": "source",
          "type": "pig_record_source",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'manual'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "activities_account_idx": {
          "name": "activities_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "occurred_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "activities_contact_idx": {
          "name": "activities_contact_idx",
          "columns": [
            {
              "expression": "contact_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "occurred_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "activities_demand_deal_idx": {
          "name": "activities_demand_deal_idx",
          "columns": [
            {
              "expression": "demand_deal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "occurred_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "activities_supply_deal_idx": {
          "name": "activities_supply_deal_idx",
          "columns": [
            {
              "expression": "supply_deal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "occurred_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "activities_external_id_key": {
          "name": "activities_external_id_key",
          "columns": [
            {
              "expression": "external_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "activities_account_id_accounts_id_fk": {
          "name": "activities_account_id_accounts_id_fk",
          "tableFrom": "activities",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "activities_contact_id_contacts_id_fk": {
          "name": "activities_contact_id_contacts_id_fk",
          "tableFrom": "activities",
          "tableTo": "contacts",
          "columnsFrom": [
            "contact_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "activities_actor_user_id_users_id_fk": {
          "name": "activities_actor_user_id_users_id_fk",
          "tableFrom": "activities",
          "tableTo": "users",
          "columnsFrom": [
            "actor_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.channel_links": {
      "name": "channel_links",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "platform": {
          "name": "platform",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "channel_id": {
          "name": "channel_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "channel_name": {
          "name": "channel_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "notify_on": {
          "name": "notify_on",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "channel_links_platform_channel_key": {
          "name": "channel_links_platform_channel_key",
          "columns": [
            {
              "expression": "platform",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "channel_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "channel_links_account_idx": {
          "name": "channel_links_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "channel_links_account_id_accounts_id_fk": {
          "name": "channel_links_account_id_accounts_id_fk",
          "tableFrom": "channel_links",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.contacts": {
      "name": "contacts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "full_name": {
          "name": "full_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "first_name": {
          "name": "first_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_name": {
          "name": "last_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "phone": {
          "name": "phone",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "linkedin_url": {
          "name": "linkedin_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "twitter_handle": {
          "name": "twitter_handle",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "github_handle": {
          "name": "github_handle",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "website_url": {
          "name": "website_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "avatar_url": {
          "name": "avatar_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "affiliation": {
          "name": "affiliation",
          "type": "pig_affiliation_kind",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'unknown'"
        },
        "departed_at": {
          "name": "departed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "is_decision_maker": {
          "name": "is_decision_maker",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "owner_user_id": {
          "name": "owner_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "source": {
          "name": "source",
          "type": "pig_record_source",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'manual'"
        },
        "source_url": {
          "name": "source_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "confidence": {
          "name": "confidence",
          "type": "pig_confidence_grade",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'confirmed'"
        },
        "confidence_note": {
          "name": "confidence_note",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_activity_at": {
          "name": "last_activity_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "archived_at": {
          "name": "archived_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "contacts_account_idx": {
          "name": "contacts_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contacts_email_idx": {
          "name": "contacts_email_idx",
          "columns": [
            {
              "expression": "email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contacts_name_idx": {
          "name": "contacts_name_idx",
          "columns": [
            {
              "expression": "full_name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contacts_confidence_idx": {
          "name": "contacts_confidence_idx",
          "columns": [
            {
              "expression": "confidence",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "contacts_account_id_accounts_id_fk": {
          "name": "contacts_account_id_accounts_id_fk",
          "tableFrom": "contacts",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "contacts_owner_user_id_users_id_fk": {
          "name": "contacts_owner_user_id_users_id_fk",
          "tableFrom": "contacts",
          "tableTo": "users",
          "columnsFrom": [
            "owner_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.capacity_commitments": {
      "name": "capacity_commitments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "supply_deal_id": {
          "name": "supply_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "gpu_type": {
          "name": "gpu_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "socket": {
          "name": "socket",
          "type": "pig_gpu_socket",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_count": {
          "name": "gpu_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "interconnect_type": {
          "name": "interconnect_type",
          "type": "pig_interconnect_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'Unknown'"
        },
        "security_tier": {
          "name": "security_tier",
          "type": "pig_security_tier",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'secure_cloud'"
        },
        "starts_at": {
          "name": "starts_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "ends_at": {
          "name": "ends_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "total_gpu_hours": {
          "name": "total_gpu_hours",
          "type": "numeric(16, 2)",
          "primaryKey": false,
          "notNull": true
        },
        "cost_per_gpu_hour_cents": {
          "name": "cost_per_gpu_hour_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "currency": {
          "name": "currency",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'USD'"
        },
        "shape": {
          "name": "shape",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "colocate_with": {
          "name": "colocate_with",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "is_contiguous": {
          "name": "is_contiguous",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "minimum_spend_cents": {
          "name": "minimum_spend_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "is_auto_renew": {
          "name": "is_auto_renew",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "notice_days": {
          "name": "notice_days",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "take_or_pay_floor_pct": {
          "name": "take_or_pay_floor_pct",
          "type": "numeric(6, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "prepaid_pct": {
          "name": "prepaid_pct",
          "type": "numeric(6, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "prepaid_amount_cents": {
          "name": "prepaid_amount_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "useful_life_years": {
          "name": "useful_life_years",
          "type": "numeric(4, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "salvage_value_pct": {
          "name": "salvage_value_pct",
          "type": "numeric(6, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "depreciation_start_at": {
          "name": "depreciation_start_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "cost_of_capital_bps": {
          "name": "cost_of_capital_bps",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "financing_instrument": {
          "name": "financing_instrument",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "oversubscription_pct": {
          "name": "oversubscription_pct",
          "type": "numeric(6, 2)",
          "primaryKey": false,
          "notNull": true,
          "default": "'0'"
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "terminated_at": {
          "name": "terminated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "capacity_commitments_account_idx": {
          "name": "capacity_commitments_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "capacity_commitments_gpu_type_idx": {
          "name": "capacity_commitments_gpu_type_idx",
          "columns": [
            {
              "expression": "gpu_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "capacity_commitments_window_idx": {
          "name": "capacity_commitments_window_idx",
          "columns": [
            {
              "expression": "starts_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "ends_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "capacity_commitments_account_id_accounts_id_fk": {
          "name": "capacity_commitments_account_id_accounts_id_fk",
          "tableFrom": "capacity_commitments",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "restrict",
          "onUpdate": "no action"
        },
        "capacity_commitments_site_id_sites_id_fk": {
          "name": "capacity_commitments_site_id_sites_id_fk",
          "tableFrom": "capacity_commitments",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "capacity_commitments_supply_deal_id_supply_deals_id_fk": {
          "name": "capacity_commitments_supply_deal_id_supply_deals_id_fk",
          "tableFrom": "capacity_commitments",
          "tableTo": "supply_deals",
          "columnsFrom": [
            "supply_deal_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.inventory_listings": {
      "name": "inventory_listings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "site_id": {
          "name": "site_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "external_cloud_id": {
          "name": "external_cloud_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "provider_slug": {
          "name": "provider_slug",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_type": {
          "name": "gpu_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "socket": {
          "name": "socket",
          "type": "pig_gpu_socket",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_count": {
          "name": "gpu_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "gpu_memory_gb": {
          "name": "gpu_memory_gb",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "vcpu": {
          "name": "vcpu",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "memory_gb": {
          "name": "memory_gb",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "disk_gb": {
          "name": "disk_gb",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "internet_mbps": {
          "name": "internet_mbps",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "interconnect_gbps": {
          "name": "interconnect_gbps",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "interconnect_type": {
          "name": "interconnect_type",
          "type": "pig_interconnect_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'Unknown'"
        },
        "region": {
          "name": "region",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "country": {
          "name": "country",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "security_tier": {
          "name": "security_tier",
          "type": "pig_security_tier",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'secure_cloud'"
        },
        "stock_status": {
          "name": "stock_status",
          "type": "pig_stock_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'Available'"
        },
        "is_spot": {
          "name": "is_spot",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "provisioning_minutes": {
          "name": "provisioning_minutes",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "prepaid_hours": {
          "name": "prepaid_hours",
          "type": "numeric(12, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "on_demand_price_cents": {
          "name": "on_demand_price_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "community_price_cents": {
          "name": "community_price_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "price_is_variable": {
          "name": "price_is_variable",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "currency": {
          "name": "currency",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'USD'"
        },
        "images": {
          "name": "images",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "raw": {
          "name": "raw",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "source": {
          "name": "source",
          "type": "pig_record_source",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'manual'"
        },
        "observed_at": {
          "name": "observed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "inventory_listings_external_key": {
          "name": "inventory_listings_external_key",
          "columns": [
            {
              "expression": "external_cloud_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "gpu_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "socket",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "gpu_count",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "security_tier",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "inventory_listings_gpu_type_idx": {
          "name": "inventory_listings_gpu_type_idx",
          "columns": [
            {
              "expression": "gpu_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "inventory_listings_stock_idx": {
          "name": "inventory_listings_stock_idx",
          "columns": [
            {
              "expression": "stock_status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "inventory_listings_interconnect_idx": {
          "name": "inventory_listings_interconnect_idx",
          "columns": [
            {
              "expression": "interconnect_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "inventory_listings_account_idx": {
          "name": "inventory_listings_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "inventory_listings_observed_idx": {
          "name": "inventory_listings_observed_idx",
          "columns": [
            {
              "expression": "observed_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "inventory_listings_account_id_accounts_id_fk": {
          "name": "inventory_listings_account_id_accounts_id_fk",
          "tableFrom": "inventory_listings",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "inventory_listings_site_id_sites_id_fk": {
          "name": "inventory_listings_site_id_sites_id_fk",
          "tableFrom": "inventory_listings",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sites": {
      "name": "sites",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "external_data_center_id": {
          "name": "external_data_center_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "country": {
          "name": "country",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "country_code": {
          "name": "country_code",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "region": {
          "name": "region",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "city": {
          "name": "city",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "jurisdiction": {
          "name": "jurisdiction",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "power_mw": {
          "name": "power_mw",
          "type": "numeric(10, 3)",
          "primaryKey": false,
          "notNull": false
        },
        "pue": {
          "name": "pue",
          "type": "numeric(4, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "certifications": {
          "name": "certifications",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "uptime_history_pct": {
          "name": "uptime_history_pct",
          "type": "numeric(6, 3)",
          "primaryKey": false,
          "notNull": false
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "sites_account_idx": {
          "name": "sites_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sites_country_idx": {
          "name": "sites_country_idx",
          "columns": [
            {
              "expression": "country_code",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "sites_account_id_accounts_id_fk": {
          "name": "sites_account_id_accounts_id_fk",
          "tableFrom": "sites",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.supply_deals": {
      "name": "supply_deals",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "stage": {
          "name": "stage",
          "type": "pig_supply_stage",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'sourced'"
        },
        "stage_changed_at": {
          "name": "stage_changed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "owner_user_id": {
          "name": "owner_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "primary_contact_id": {
          "name": "primary_contact_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_type": {
          "name": "gpu_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_count": {
          "name": "gpu_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "interconnect_type": {
          "name": "interconnect_type",
          "type": "pig_interconnect_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "target_cost_per_gpu_hour_cents": {
          "name": "target_cost_per_gpu_hour_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "term_months": {
          "name": "term_months",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "available_from": {
          "name": "available_from",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "technical_verdict": {
          "name": "technical_verdict",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "technical_verdict_by": {
          "name": "technical_verdict_by",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "technical_verdict_at": {
          "name": "technical_verdict_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "technical_notes": {
          "name": "technical_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "financial_verdict": {
          "name": "financial_verdict",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "financial_verdict_by": {
          "name": "financial_verdict_by",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "financial_verdict_at": {
          "name": "financial_verdict_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "financial_notes": {
          "name": "financial_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "rejection_reason": {
          "name": "rejection_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "closed_at": {
          "name": "closed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "last_activity_at": {
          "name": "last_activity_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "supply_deals_account_idx": {
          "name": "supply_deals_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "supply_deals_stage_idx": {
          "name": "supply_deals_stage_idx",
          "columns": [
            {
              "expression": "stage",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "supply_deals_owner_idx": {
          "name": "supply_deals_owner_idx",
          "columns": [
            {
              "expression": "owner_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "supply_deals_account_id_accounts_id_fk": {
          "name": "supply_deals_account_id_accounts_id_fk",
          "tableFrom": "supply_deals",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "supply_deals_site_id_sites_id_fk": {
          "name": "supply_deals_site_id_sites_id_fk",
          "tableFrom": "supply_deals",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "supply_deals_owner_user_id_users_id_fk": {
          "name": "supply_deals_owner_user_id_users_id_fk",
          "tableFrom": "supply_deals",
          "tableTo": "users",
          "columnsFrom": [
            "owner_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "supply_deals_primary_contact_id_contacts_id_fk": {
          "name": "supply_deals_primary_contact_id_contacts_id_fk",
          "tableFrom": "supply_deals",
          "tableTo": "contacts",
          "columnsFrom": [
            "primary_contact_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "supply_deals_technical_verdict_by_users_id_fk": {
          "name": "supply_deals_technical_verdict_by_users_id_fk",
          "tableFrom": "supply_deals",
          "tableTo": "users",
          "columnsFrom": [
            "technical_verdict_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "supply_deals_financial_verdict_by_users_id_fk": {
          "name": "supply_deals_financial_verdict_by_users_id_fk",
          "tableFrom": "supply_deals",
          "tableTo": "users",
          "columnsFrom": [
            "financial_verdict_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.capacity_requests": {
      "name": "capacity_requests",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "demand_deal_id": {
          "name": "demand_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "gpu_type": {
          "name": "gpu_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_type_alternatives": {
          "name": "gpu_type_alternatives",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "gpu_count": {
          "name": "gpu_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "requires_high_speed_interconnect": {
          "name": "requires_high_speed_interconnect",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "min_interconnect_type": {
          "name": "min_interconnect_type",
          "type": "pig_interconnect_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "min_security_tier": {
          "name": "min_security_tier",
          "type": "pig_security_tier",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'secure_cloud'"
        },
        "allowed_regions": {
          "name": "allowed_regions",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "excluded_jurisdictions": {
          "name": "excluded_jurisdictions",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "starts_at": {
          "name": "starts_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "ends_at": {
          "name": "ends_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "total_gpu_hours": {
          "name": "total_gpu_hours",
          "type": "numeric(16, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "max_price_per_gpu_hour_cents": {
          "name": "max_price_per_gpu_hour_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "required_certifications": {
          "name": "required_certifications",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "capacity_requests_deal_idx": {
          "name": "capacity_requests_deal_idx",
          "columns": [
            {
              "expression": "demand_deal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "capacity_requests_gpu_type_idx": {
          "name": "capacity_requests_gpu_type_idx",
          "columns": [
            {
              "expression": "gpu_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "capacity_requests_window_idx": {
          "name": "capacity_requests_window_idx",
          "columns": [
            {
              "expression": "starts_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "ends_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "capacity_requests_demand_deal_id_demand_deals_id_fk": {
          "name": "capacity_requests_demand_deal_id_demand_deals_id_fk",
          "tableFrom": "capacity_requests",
          "tableTo": "demand_deals",
          "columnsFrom": [
            "demand_deal_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.deal_contacts": {
      "name": "deal_contacts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "demand_deal_id": {
          "name": "demand_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "contact_id": {
          "name": "contact_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "deal_contacts_deal_idx": {
          "name": "deal_contacts_deal_idx",
          "columns": [
            {
              "expression": "demand_deal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "deal_contacts_contact_idx": {
          "name": "deal_contacts_contact_idx",
          "columns": [
            {
              "expression": "contact_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "deal_contacts_demand_deal_id_demand_deals_id_fk": {
          "name": "deal_contacts_demand_deal_id_demand_deals_id_fk",
          "tableFrom": "deal_contacts",
          "tableTo": "demand_deals",
          "columnsFrom": [
            "demand_deal_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "deal_contacts_contact_id_contacts_id_fk": {
          "name": "deal_contacts_contact_id_contacts_id_fk",
          "tableFrom": "deal_contacts",
          "tableTo": "contacts",
          "columnsFrom": [
            "contact_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.demand_deals": {
      "name": "demand_deals",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "product_line": {
          "name": "product_line",
          "type": "pig_product_line",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'compute_reserved'"
        },
        "stage": {
          "name": "stage",
          "type": "pig_demand_stage",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'qualification'"
        },
        "stage_changed_at": {
          "name": "stage_changed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "owner_user_id": {
          "name": "owner_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "primary_contact_id": {
          "name": "primary_contact_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "acv_cents": {
          "name": "acv_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "tcv_cents": {
          "name": "tcv_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "currency": {
          "name": "currency",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'USD'"
        },
        "term_months": {
          "name": "term_months",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "probability": {
          "name": "probability",
          "type": "numeric(4, 3)",
          "primaryKey": false,
          "notNull": false
        },
        "expected_close_date": {
          "name": "expected_close_date",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "closed_at": {
          "name": "closed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "closed_reason": {
          "name": "closed_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "msa_executed": {
          "name": "msa_executed",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "dpa_executed": {
          "name": "dpa_executed",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "parent_deal_id": {
          "name": "parent_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "last_activity_at": {
          "name": "last_activity_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "demand_deals_account_idx": {
          "name": "demand_deals_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "demand_deals_stage_idx": {
          "name": "demand_deals_stage_idx",
          "columns": [
            {
              "expression": "stage",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "demand_deals_owner_idx": {
          "name": "demand_deals_owner_idx",
          "columns": [
            {
              "expression": "owner_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "demand_deals_close_date_idx": {
          "name": "demand_deals_close_date_idx",
          "columns": [
            {
              "expression": "expected_close_date",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "demand_deals_account_id_accounts_id_fk": {
          "name": "demand_deals_account_id_accounts_id_fk",
          "tableFrom": "demand_deals",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "demand_deals_owner_user_id_users_id_fk": {
          "name": "demand_deals_owner_user_id_users_id_fk",
          "tableFrom": "demand_deals",
          "tableTo": "users",
          "columnsFrom": [
            "owner_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "demand_deals_primary_contact_id_contacts_id_fk": {
          "name": "demand_deals_primary_contact_id_contacts_id_fk",
          "tableFrom": "demand_deals",
          "tableTo": "contacts",
          "columnsFrom": [
            "primary_contact_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.allocations": {
      "name": "allocations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "capacity_commitment_id": {
          "name": "capacity_commitment_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "demand_deal_id": {
          "name": "demand_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "internal_team": {
          "name": "internal_team",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_hours": {
          "name": "gpu_hours",
          "type": "numeric(16, 2)",
          "primaryKey": false,
          "notNull": true
        },
        "price_per_gpu_hour_cents": {
          "name": "price_per_gpu_hour_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "currency": {
          "name": "currency",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'USD'"
        },
        "starts_at": {
          "name": "starts_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "ends_at": {
          "name": "ends_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'planned'"
        },
        "hold_expires_at": {
          "name": "hold_expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "hold_opportunity_cost_cents": {
          "name": "hold_opportunity_cost_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "guarantee_type": {
          "name": "guarantee_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'committed'"
        },
        "priority": {
          "name": "priority",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 100
        },
        "compliance_decision_id": {
          "name": "compliance_decision_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "created_by_user_id": {
          "name": "created_by_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "released_at": {
          "name": "released_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "allocations_commitment_idx": {
          "name": "allocations_commitment_idx",
          "columns": [
            {
              "expression": "capacity_commitment_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "allocations_deal_idx": {
          "name": "allocations_deal_idx",
          "columns": [
            {
              "expression": "demand_deal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "allocations_status_idx": {
          "name": "allocations_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "allocations_window_idx": {
          "name": "allocations_window_idx",
          "columns": [
            {
              "expression": "starts_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "ends_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "allocations_hold_expiry_idx": {
          "name": "allocations_hold_expiry_idx",
          "columns": [
            {
              "expression": "hold_expires_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "allocations_capacity_commitment_id_capacity_commitments_id_fk": {
          "name": "allocations_capacity_commitment_id_capacity_commitments_id_fk",
          "tableFrom": "allocations",
          "tableTo": "capacity_commitments",
          "columnsFrom": [
            "capacity_commitment_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "restrict",
          "onUpdate": "no action"
        },
        "allocations_demand_deal_id_demand_deals_id_fk": {
          "name": "allocations_demand_deal_id_demand_deals_id_fk",
          "tableFrom": "allocations",
          "tableTo": "demand_deals",
          "columnsFrom": [
            "demand_deal_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "allocations_created_by_user_id_users_id_fk": {
          "name": "allocations_created_by_user_id_users_id_fk",
          "tableFrom": "allocations",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.contract_obligations": {
      "name": "contract_obligations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "contract_id": {
          "name": "contract_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "kind": {
          "name": "kind",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'milestone'"
        },
        "due_at": {
          "name": "due_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "owner_user_id": {
          "name": "owner_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "contract_obligations_contract_idx": {
          "name": "contract_obligations_contract_idx",
          "columns": [
            {
              "expression": "contract_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contract_obligations_due_idx": {
          "name": "contract_obligations_due_idx",
          "columns": [
            {
              "expression": "due_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contract_obligations_owner_idx": {
          "name": "contract_obligations_owner_idx",
          "columns": [
            {
              "expression": "owner_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "contract_obligations_contract_id_contracts_id_fk": {
          "name": "contract_obligations_contract_id_contracts_id_fk",
          "tableFrom": "contract_obligations",
          "tableTo": "contracts",
          "columnsFrom": [
            "contract_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "contract_obligations_owner_user_id_users_id_fk": {
          "name": "contract_obligations_owner_user_id_users_id_fk",
          "tableFrom": "contract_obligations",
          "tableTo": "users",
          "columnsFrom": [
            "owner_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.contracts": {
      "name": "contracts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "pig_contract_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "pig_contract_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "side": {
          "name": "side",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'demand'"
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "external_reference": {
          "name": "external_reference",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "demand_deal_id": {
          "name": "demand_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "supply_deal_id": {
          "name": "supply_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "capacity_commitment_id": {
          "name": "capacity_commitment_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "parent_contract_id": {
          "name": "parent_contract_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "contracting_party_name": {
          "name": "contracting_party_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "take_or_pay_floor_pct": {
          "name": "take_or_pay_floor_pct",
          "type": "numeric(6, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "prepaid_pct": {
          "name": "prepaid_pct",
          "type": "numeric(6, 2)",
          "primaryKey": false,
          "notNull": false
        },
        "termination_tier": {
          "name": "termination_tier",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "assignable_on_default": {
          "name": "assignable_on_default",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "assignment_deadline_business_days": {
          "name": "assignment_deadline_business_days",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "effective_at": {
          "name": "effective_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "executed_at": {
          "name": "executed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "terminated_at": {
          "name": "terminated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "is_auto_renew": {
          "name": "is_auto_renew",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "notice_days": {
          "name": "notice_days",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "value_cents": {
          "name": "value_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "currency": {
          "name": "currency",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'USD'"
        },
        "governing_law": {
          "name": "governing_law",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "document_url": {
          "name": "document_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "owner_user_id": {
          "name": "owner_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "contracts_account_idx": {
          "name": "contracts_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contracts_type_idx": {
          "name": "contracts_type_idx",
          "columns": [
            {
              "expression": "type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contracts_status_idx": {
          "name": "contracts_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contracts_expiry_idx": {
          "name": "contracts_expiry_idx",
          "columns": [
            {
              "expression": "expires_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "contracts_demand_deal_idx": {
          "name": "contracts_demand_deal_idx",
          "columns": [
            {
              "expression": "demand_deal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "contracts_account_id_accounts_id_fk": {
          "name": "contracts_account_id_accounts_id_fk",
          "tableFrom": "contracts",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "contracts_demand_deal_id_demand_deals_id_fk": {
          "name": "contracts_demand_deal_id_demand_deals_id_fk",
          "tableFrom": "contracts",
          "tableTo": "demand_deals",
          "columnsFrom": [
            "demand_deal_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "contracts_supply_deal_id_supply_deals_id_fk": {
          "name": "contracts_supply_deal_id_supply_deals_id_fk",
          "tableFrom": "contracts",
          "tableTo": "supply_deals",
          "columnsFrom": [
            "supply_deal_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "contracts_capacity_commitment_id_capacity_commitments_id_fk": {
          "name": "contracts_capacity_commitment_id_capacity_commitments_id_fk",
          "tableFrom": "contracts",
          "tableTo": "capacity_commitments",
          "columnsFrom": [
            "capacity_commitment_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "contracts_owner_user_id_users_id_fk": {
          "name": "contracts_owner_user_id_users_id_fk",
          "tableFrom": "contracts",
          "tableTo": "users",
          "columnsFrom": [
            "owner_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sla_metric_targets": {
      "name": "sla_metric_targets",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "sla_term_id": {
          "name": "sla_term_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "metric": {
          "name": "metric",
          "type": "pig_sla_metric",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "target_value": {
          "name": "target_value",
          "type": "numeric(12, 3)",
          "primaryKey": false,
          "notNull": true
        },
        "unit": {
          "name": "unit",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "sla_metric_targets_term_idx": {
          "name": "sla_metric_targets_term_idx",
          "columns": [
            {
              "expression": "sla_term_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "sla_metric_targets_sla_term_id_sla_terms_id_fk": {
          "name": "sla_metric_targets_sla_term_id_sla_terms_id_fk",
          "tableFrom": "sla_metric_targets",
          "tableTo": "sla_terms",
          "columnsFrom": [
            "sla_term_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sla_terms": {
      "name": "sla_terms",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "contract_id": {
          "name": "contract_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "kind": {
          "name": "kind",
          "type": "pig_sla_kind",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'credits_policy'"
        },
        "uptime_target_pct": {
          "name": "uptime_target_pct",
          "type": "numeric(6, 3)",
          "primaryKey": false,
          "notNull": false
        },
        "node_replacement_hours": {
          "name": "node_replacement_hours",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "mttr_hours": {
          "name": "mttr_hours",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "support_response_hours": {
          "name": "support_response_hours",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "measurement_window": {
          "name": "measurement_window",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'monthly'"
        },
        "measurement_unit": {
          "name": "measurement_unit",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'cluster'"
        },
        "remedy_type": {
          "name": "remedy_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'service_credit'"
        },
        "abatement_trigger_value": {
          "name": "abatement_trigger_value",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "abatement_trigger_unit": {
          "name": "abatement_trigger_unit",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "claim_deadline_value": {
          "name": "claim_deadline_value",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "claim_deadline_unit": {
          "name": "claim_deadline_unit",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'days'"
        },
        "credit_expiry_months": {
          "name": "credit_expiry_months",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "is_sole_remedy": {
          "name": "is_sole_remedy",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "spare_pool_obligation": {
          "name": "spare_pool_obligation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "spare_pool_scope": {
          "name": "spare_pool_scope",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "maintenance_classes": {
          "name": "maintenance_classes",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "reasonable_endeavours_days_per_year": {
          "name": "reasonable_endeavours_days_per_year",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "rca_delivery_hours": {
          "name": "rca_delivery_hours",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "credit_schedule": {
          "name": "credit_schedule",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "credit_cap_pct": {
          "name": "credit_cap_pct",
          "type": "numeric(6, 3)",
          "primaryKey": false,
          "notNull": false
        },
        "exclusions": {
          "name": "exclusions",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "sla_terms_contract_idx": {
          "name": "sla_terms_contract_idx",
          "columns": [
            {
              "expression": "contract_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "sla_terms_contract_id_contracts_id_fk": {
          "name": "sla_terms_contract_id_contracts_id_fk",
          "tableFrom": "sla_terms",
          "tableTo": "contracts",
          "columnsFrom": [
            "contract_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.compliance_artifacts": {
      "name": "compliance_artifacts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "claim": {
          "name": "claim",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "scope": {
          "name": "scope",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_certified": {
          "name": "is_certified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "soc2_type": {
          "name": "soc2_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "observation_window_start": {
          "name": "observation_window_start",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "observation_window_end": {
          "name": "observation_window_end",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "audit_firm": {
          "name": "audit_firm",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "carve_out_method": {
          "name": "carve_out_method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "products_in_scope": {
          "name": "products_in_scope",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "evidence_url": {
          "name": "evidence_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "verified_by_user_id": {
          "name": "verified_by_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "verified_at": {
          "name": "verified_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "compliance_artifacts_account_idx": {
          "name": "compliance_artifacts_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "compliance_artifacts_claim_idx": {
          "name": "compliance_artifacts_claim_idx",
          "columns": [
            {
              "expression": "claim",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "compliance_artifacts_expiry_idx": {
          "name": "compliance_artifacts_expiry_idx",
          "columns": [
            {
              "expression": "expires_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "compliance_artifacts_account_id_accounts_id_fk": {
          "name": "compliance_artifacts_account_id_accounts_id_fk",
          "tableFrom": "compliance_artifacts",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "compliance_artifacts_verified_by_user_id_users_id_fk": {
          "name": "compliance_artifacts_verified_by_user_id_users_id_fk",
          "tableFrom": "compliance_artifacts",
          "tableTo": "users",
          "columnsFrom": [
            "verified_by_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.compliance_decisions": {
      "name": "compliance_decisions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "allocation_id": {
          "name": "allocation_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "beneficial_owner_name": {
          "name": "beneficial_owner_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ultimate_parent_country": {
          "name": "ultimate_parent_country",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "physical_jurisdiction": {
          "name": "physical_jurisdiction",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "end_use": {
          "name": "end_use",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "decision": {
          "name": "decision",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'needs_review'"
        },
        "rationale": {
          "name": "rationale",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "rule_version": {
          "name": "rule_version",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "decided_by_user_id": {
          "name": "decided_by_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "decided_at": {
          "name": "decided_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "re_evaluation_triggers": {
          "name": "re_evaluation_triggers",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "superseded_at": {
          "name": "superseded_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "compliance_decisions_allocation_idx": {
          "name": "compliance_decisions_allocation_idx",
          "columns": [
            {
              "expression": "allocation_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "compliance_decisions_account_idx": {
          "name": "compliance_decisions_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "compliance_decisions_decision_idx": {
          "name": "compliance_decisions_decision_idx",
          "columns": [
            {
              "expression": "decision",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "compliance_decisions_allocation_id_allocations_id_fk": {
          "name": "compliance_decisions_allocation_id_allocations_id_fk",
          "tableFrom": "compliance_decisions",
          "tableTo": "allocations",
          "columnsFrom": [
            "allocation_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "compliance_decisions_account_id_accounts_id_fk": {
          "name": "compliance_decisions_account_id_accounts_id_fk",
          "tableFrom": "compliance_decisions",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "compliance_decisions_decided_by_user_id_users_id_fk": {
          "name": "compliance_decisions_decided_by_user_id_users_id_fk",
          "tableFrom": "compliance_decisions",
          "tableTo": "users",
          "columnsFrom": [
            "decided_by_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.export_authorizations": {
      "name": "export_authorizations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "authorization_type": {
          "name": "authorization_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'none'"
        },
        "reference": {
          "name": "reference",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "scope_notes": {
          "name": "scope_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "issued_at": {
          "name": "issued_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "evidence_url": {
          "name": "evidence_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "verified_by_user_id": {
          "name": "verified_by_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "verified_at": {
          "name": "verified_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "volatile": {
          "name": "volatile",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "export_authorizations_account_idx": {
          "name": "export_authorizations_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "export_authorizations_expiry_idx": {
          "name": "export_authorizations_expiry_idx",
          "columns": [
            {
              "expression": "expires_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "export_authorizations_account_id_accounts_id_fk": {
          "name": "export_authorizations_account_id_accounts_id_fk",
          "tableFrom": "export_authorizations",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "export_authorizations_verified_by_user_id_users_id_fk": {
          "name": "export_authorizations_verified_by_user_id_users_id_fk",
          "tableFrom": "export_authorizations",
          "tableTo": "users",
          "columnsFrom": [
            "verified_by_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.agent_actions": {
      "name": "agent_actions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "agent_run_id": {
          "name": "agent_run_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "target_type": {
          "name": "target_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "target_id": {
          "name": "target_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "idempotency_key": {
          "name": "idempotency_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "external_id": {
          "name": "external_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "agent_actions_idempotency_key": {
          "name": "agent_actions_idempotency_key",
          "columns": [
            {
              "expression": "idempotency_key",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "agent_actions_run_idx": {
          "name": "agent_actions_run_idx",
          "columns": [
            {
              "expression": "agent_run_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "agent_actions_agent_run_id_agent_runs_id_fk": {
          "name": "agent_actions_agent_run_id_agent_runs_id_fk",
          "tableFrom": "agent_actions",
          "tableTo": "agent_runs",
          "columnsFrom": [
            "agent_run_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.agent_runs": {
      "name": "agent_runs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "agent_task_id": {
          "name": "agent_task_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "agent": {
          "name": "agent",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'piggy'"
        },
        "principal_user_id": {
          "name": "principal_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'running'"
        },
        "model": {
          "name": "model",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "input_tokens": {
          "name": "input_tokens",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "output_tokens": {
          "name": "output_tokens",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "cost_micro_cents": {
          "name": "cost_micro_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "input": {
          "name": "input",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "result": {
          "name": "result",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "finished_at": {
          "name": "finished_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "agent_runs_task_idx": {
          "name": "agent_runs_task_idx",
          "columns": [
            {
              "expression": "agent_task_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "agent_runs_principal_idx": {
          "name": "agent_runs_principal_idx",
          "columns": [
            {
              "expression": "principal_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "agent_runs_agent_task_id_agent_tasks_id_fk": {
          "name": "agent_runs_agent_task_id_agent_tasks_id_fk",
          "tableFrom": "agent_runs",
          "tableTo": "agent_tasks",
          "columnsFrom": [
            "agent_task_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "agent_runs_principal_user_id_users_id_fk": {
          "name": "agent_runs_principal_user_id_users_id_fk",
          "tableFrom": "agent_runs",
          "tableTo": "users",
          "columnsFrom": [
            "principal_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.agent_tasks": {
      "name": "agent_tasks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "kind": {
          "name": "kind",
          "type": "pig_agent_task_kind",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "subject": {
          "name": "subject",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "payload": {
          "name": "payload",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "priority": {
          "name": "priority",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "budget": {
          "name": "budget",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 4
        },
        "attempts": {
          "name": "attempts",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "max_attempts": {
          "name": "max_attempts",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 3
        },
        "due_at": {
          "name": "due_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "leased_until": {
          "name": "leased_until",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "leased_by": {
          "name": "leased_by",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "finished_at": {
          "name": "finished_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "outcome": {
          "name": "outcome",
          "type": "pig_agent_task_outcome",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "requested_by_user_id": {
          "name": "requested_by_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "agent_tasks_pending_key": {
          "name": "agent_tasks_pending_key",
          "columns": [
            {
              "expression": "kind",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "subject",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "where": "\"agent_tasks\".\"finished_at\" IS NULL",
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "agent_tasks_claimable_idx": {
          "name": "agent_tasks_claimable_idx",
          "columns": [
            {
              "expression": "due_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "priority",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "agent_tasks_lease_idx": {
          "name": "agent_tasks_lease_idx",
          "columns": [
            {
              "expression": "leased_until",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "agent_tasks_requested_by_user_id_users_id_fk": {
          "name": "agent_tasks_requested_by_user_id_users_id_fk",
          "tableFrom": "agent_tasks",
          "tableTo": "users",
          "columnsFrom": [
            "requested_by_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.facts": {
      "name": "facts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "contact_id": {
          "name": "contact_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "field": {
          "name": "field",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "score": {
          "name": "score",
          "type": "numeric(4, 3)",
          "primaryKey": false,
          "notNull": true
        },
        "band": {
          "name": "band",
          "type": "pig_fact_band",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "pig_fact_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'proposed'"
        },
        "evidence": {
          "name": "evidence",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "source_url": {
          "name": "source_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "method": {
          "name": "method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "agent_run_id": {
          "name": "agent_run_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "decided_by_user_id": {
          "name": "decided_by_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "decided_at": {
          "name": "decided_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "observed_at": {
          "name": "observed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "superseded_at": {
          "name": "superseded_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "facts_account_idx": {
          "name": "facts_account_idx",
          "columns": [
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "facts_contact_idx": {
          "name": "facts_contact_idx",
          "columns": [
            {
              "expression": "contact_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "facts_status_idx": {
          "name": "facts_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "facts_field_idx": {
          "name": "facts_field_idx",
          "columns": [
            {
              "expression": "field",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "facts_account_id_accounts_id_fk": {
          "name": "facts_account_id_accounts_id_fk",
          "tableFrom": "facts",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "facts_contact_id_contacts_id_fk": {
          "name": "facts_contact_id_contacts_id_fk",
          "tableFrom": "facts",
          "tableTo": "contacts",
          "columnsFrom": [
            "contact_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "facts_decided_by_user_id_users_id_fk": {
          "name": "facts_decided_by_user_id_users_id_fk",
          "tableFrom": "facts",
          "tableTo": "users",
          "columnsFrom": [
            "decided_by_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.field_definitions": {
      "name": "field_definitions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "entity": {
          "name": "entity",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'text'"
        },
        "agent_filled": {
          "name": "agent_filled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "agent_brief": {
          "name": "agent_brief",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_required": {
          "name": "is_required",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "show_on_table": {
          "name": "show_on_table",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "archived_at": {
          "name": "archived_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "field_definitions_entity_key": {
          "name": "field_definitions_entity_key",
          "columns": [
            {
              "expression": "entity",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "key",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.field_options": {
      "name": "field_options",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "field_id": {
          "name": "field_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "archived_at": {
          "name": "archived_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "field_options_field_idx": {
          "name": "field_options_field_idx",
          "columns": [
            {
              "expression": "field_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "field_options_field_id_field_definitions_id_fk": {
          "name": "field_options_field_id_field_definitions_id_fk",
          "tableFrom": "field_options",
          "tableTo": "field_definitions",
          "columnsFrom": [
            "field_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.field_values": {
      "name": "field_values",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "field_id": {
          "name": "field_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "account_id": {
          "name": "account_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "contact_id": {
          "name": "contact_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "demand_deal_id": {
          "name": "demand_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "supply_deal_id": {
          "name": "supply_deal_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "text_value": {
          "name": "text_value",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "number_value": {
          "name": "number_value",
          "type": "numeric(24, 4)",
          "primaryKey": false,
          "notNull": false
        },
        "date_value": {
          "name": "date_value",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "bool_value": {
          "name": "bool_value",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false
        },
        "option_id": {
          "name": "option_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "user_value": {
          "name": "user_value",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "field_values_account_key": {
          "name": "field_values_account_key",
          "columns": [
            {
              "expression": "field_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "field_values_contact_key": {
          "name": "field_values_contact_key",
          "columns": [
            {
              "expression": "field_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "contact_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "field_values_demand_deal_key": {
          "name": "field_values_demand_deal_key",
          "columns": [
            {
              "expression": "field_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "demand_deal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "field_values_supply_deal_key": {
          "name": "field_values_supply_deal_key",
          "columns": [
            {
              "expression": "field_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "supply_deal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "field_values_field_id_field_definitions_id_fk": {
          "name": "field_values_field_id_field_definitions_id_fk",
          "tableFrom": "field_values",
          "tableTo": "field_definitions",
          "columnsFrom": [
            "field_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "field_values_account_id_accounts_id_fk": {
          "name": "field_values_account_id_accounts_id_fk",
          "tableFrom": "field_values",
          "tableTo": "accounts",
          "columnsFrom": [
            "account_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "field_values_contact_id_contacts_id_fk": {
          "name": "field_values_contact_id_contacts_id_fk",
          "tableFrom": "field_values",
          "tableTo": "contacts",
          "columnsFrom": [
            "contact_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "field_values_demand_deal_id_demand_deals_id_fk": {
          "name": "field_values_demand_deal_id_demand_deals_id_fk",
          "tableFrom": "field_values",
          "tableTo": "demand_deals",
          "columnsFrom": [
            "demand_deal_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "field_values_supply_deal_id_supply_deals_id_fk": {
          "name": "field_values_supply_deal_id_supply_deals_id_fk",
          "tableFrom": "field_values",
          "tableTo": "supply_deals",
          "columnsFrom": [
            "supply_deal_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "field_values_option_id_field_options_id_fk": {
          "name": "field_values_option_id_field_options_id_fk",
          "tableFrom": "field_values",
          "tableTo": "field_options",
          "columnsFrom": [
            "option_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "field_values_user_value_users_id_fk": {
          "name": "field_values_user_value_users_id_fk",
          "tableFrom": "field_values",
          "tableTo": "users",
          "columnsFrom": [
            "user_value"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {
    "public.pig_account_side": {
      "name": "pig_account_side",
      "schema": "public",
      "values": [
        "supply",
        "demand",
        "both"
      ]
    },
    "public.pig_activity_type": {
      "name": "pig_activity_type",
      "schema": "public",
      "values": [
        "note",
        "email",
        "call",
        "meeting",
        "slack",
        "buzz",
        "stage_change",
        "contract_event",
        "task",
        "agent_action"
      ]
    },
    "public.pig_affiliation_kind": {
      "name": "pig_affiliation_kind",
      "schema": "public",
      "values": [
        "staff",
        "founder",
        "alumni",
        "contributor",
        "resident",
        "advisor",
        "investor",
        "customer_reference",
        "unknown"
      ]
    },
    "public.pig_agent_task_kind": {
      "name": "pig_agent_task_kind",
      "schema": "public",
      "values": [
        "enrich_account",
        "enrich_contact",
        "write_brief",
        "match_capacity",
        "detect_idle_capacity",
        "summarise_pipeline",
        "watch_renewal",
        "research_supplier"
      ]
    },
    "public.pig_agent_task_outcome": {
      "name": "pig_agent_task_outcome",
      "schema": "public",
      "values": [
        "succeeded",
        "failed",
        "skipped",
        "cancelled"
      ]
    },
    "public.pig_confidence_grade": {
      "name": "pig_confidence_grade",
      "schema": "public",
      "values": [
        "confirmed",
        "probable",
        "unverified",
        "disputed"
      ]
    },
    "public.pig_contract_status": {
      "name": "pig_contract_status",
      "schema": "public",
      "values": [
        "draft",
        "in_review",
        "in_negotiation",
        "out_for_signature",
        "executed",
        "expired",
        "terminated"
      ]
    },
    "public.pig_contract_type": {
      "name": "pig_contract_type",
      "schema": "public",
      "values": [
        "msa",
        "dpa",
        "sla",
        "order_form",
        "capacity_commitment",
        "nda",
        "amendment"
      ]
    },
    "public.pig_customer_segment": {
      "name": "pig_customer_segment",
      "schema": "public",
      "values": [
        "frontier_lab",
        "applied_ai_startup",
        "enterprise",
        "research_institution",
        "sovereign",
        "individual_developer"
      ]
    },
    "public.pig_demand_stage": {
      "name": "pig_demand_stage",
      "schema": "public",
      "values": [
        "qualification",
        "legal",
        "scoping",
        "proposal",
        "procurement",
        "poc",
        "deployment",
        "expansion",
        "closed_won",
        "closed_lost"
      ]
    },
    "public.pig_fact_band": {
      "name": "pig_fact_band",
      "schema": "public",
      "values": [
        "verified",
        "probable",
        "possible"
      ]
    },
    "public.pig_fact_status": {
      "name": "pig_fact_status",
      "schema": "public",
      "values": [
        "applied",
        "approved",
        "proposed",
        "dismissed",
        "superseded"
      ]
    },
    "public.pig_gpu_socket": {
      "name": "pig_gpu_socket",
      "schema": "public",
      "values": [
        "PCIe",
        "SXM2",
        "SXM3",
        "SXM4",
        "SXM5",
        "SXM6"
      ]
    },
    "public.pig_interconnect_type": {
      "name": "pig_interconnect_type",
      "schema": "public",
      "values": [
        "Infiniband",
        "RoCE",
        "NVLink",
        "Ethernet",
        "Unknown"
      ]
    },
    "public.pig_product_line": {
      "name": "pig_product_line",
      "schema": "public",
      "values": [
        "compute_ondemand",
        "compute_reserved",
        "compute_spot",
        "post_training",
        "inference",
        "evaluations",
        "platform"
      ]
    },
    "public.pig_record_source": {
      "name": "pig_record_source",
      "schema": "public",
      "values": [
        "manual",
        "seed",
        "agent",
        "prime_api",
        "slack",
        "buzz",
        "import"
      ]
    },
    "public.pig_security_tier": {
      "name": "pig_security_tier",
      "schema": "public",
      "values": [
        "government",
        "secure_cloud",
        "community_cloud"
      ]
    },
    "public.pig_sla_kind": {
      "name": "pig_sla_kind",
      "schema": "public",
      "values": [
        "none",
        "credits_policy",
        "negotiated"
      ]
    },
    "public.pig_sla_metric": {
      "name": "pig_sla_metric",
      "schema": "public",
      "values": [
        "uptime_pct",
        "node_availability_pct",
        "node_replacement_hours",
        "mttr_hours",
        "support_response_hours",
        "throughput_floor"
      ]
    },
    "public.pig_stock_status": {
      "name": "pig_stock_status",
      "schema": "public",
      "values": [
        "Available",
        "Low",
        "Medium",
        "High",
        "Unavailable"
      ]
    },
    "public.pig_supplier_type": {
      "name": "pig_supplier_type",
      "schema": "public",
      "values": [
        "hyperscaler",
        "neocloud",
        "regional_operator",
        "datacenter",
        "broker",
        "depin",
        "community"
      ]
    },
    "public.pig_supply_stage": {
      "name": "pig_supply_stage",
      "schema": "public",
      "values": [
        "sourced",
        "qualifying",
        "technical_diligence",
        "financial_diligence",
        "pricing",
        "contracting",
        "onboarding",
        "live",
        "renewal",
        "churned",
        "rejected"
      ]
    },
    "public.pig_team": {
      "name": "pig_team",
      "schema": "public",
      "values": [
        "supply",
        "demand",
        "research"
      ]
    },
    "public.pig_team_role": {
      "name": "pig_team_role",
      "schema": "public",
      "values": [
        "member",
        "lead",
        "admin"
      ]
    }
  },
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}