{
  "id": "5def185f-abd8-40ce-ab57-7939f8d29760",
  "prevId": "ef69ec29-f876-4b7f-bb29-bf818be46981",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.email_verification_tokens": {
      "name": "email_verification_tokens",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "email_verification_tokens_user_id_users_id_fk": {
          "name": "email_verification_tokens_user_id_users_id_fk",
          "tableFrom": "email_verification_tokens",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "email_verification_tokens_token_unique": {
          "name": "email_verification_tokens_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.gpg_keys": {
      "name": "gpg_keys",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "key_id": {
          "name": "key_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "public_key": {
          "name": "public_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "gpg_keys_user_id_users_id_fk": {
          "name": "gpg_keys_user_id_users_id_fk",
          "tableFrom": "gpg_keys",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.oauth_accounts": {
      "name": "oauth_accounts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider_account_id": {
          "name": "provider_account_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "refresh_token": {
          "name": "refresh_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "oauth_accounts_user_id_users_id_fk": {
          "name": "oauth_accounts_user_id_users_id_fk",
          "tableFrom": "oauth_accounts",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.password_reset_tokens": {
      "name": "password_reset_tokens",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "password_reset_tokens_user_id_users_id_fk": {
          "name": "password_reset_tokens_user_id_users_id_fk",
          "tableFrom": "password_reset_tokens",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "password_reset_tokens_token_unique": {
          "name": "password_reset_tokens_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.personal_access_tokens": {
      "name": "personal_access_tokens",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "last_used_at": {
          "name": "last_used_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "scopes": {
          "name": "scopes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "personal_access_tokens_user_id_users_id_fk": {
          "name": "personal_access_tokens_user_id_users_id_fk",
          "tableFrom": "personal_access_tokens",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "personal_access_tokens_token_unique": {
          "name": "personal_access_tokens_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sessions": {
      "name": "sessions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_agent": {
          "name": "user_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ip_address": {
          "name": "ip_address",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "sessions_user_idx": {
          "name": "sessions_user_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_expires_idx": {
          "name": "sessions_expires_idx",
          "columns": [
            {
              "expression": "expires_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "sessions_user_id_users_id_fk": {
          "name": "sessions_user_id_users_id_fk",
          "tableFrom": "sessions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "sessions_token_unique": {
          "name": "sessions_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ssh_keys": {
      "name": "ssh_keys",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "fingerprint": {
          "name": "fingerprint",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "public_key": {
          "name": "public_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "key_type": {
          "name": "key_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "last_used_at": {
          "name": "last_used_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "ssh_keys_user_idx": {
          "name": "ssh_keys_user_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "ssh_keys_user_id_users_id_fk": {
          "name": "ssh_keys_user_id_users_id_fk",
          "tableFrom": "ssh_keys",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "ssh_keys_fingerprint_unique": {
          "name": "ssh_keys_fingerprint_unique",
          "nullsNotDistinct": false,
          "columns": [
            "fingerprint"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_followers": {
      "name": "user_followers",
      "schema": "",
      "columns": {
        "follower_id": {
          "name": "follower_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "followee_id": {
          "name": "followee_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "user_followers_follower_id_users_id_fk": {
          "name": "user_followers_follower_id_users_id_fk",
          "tableFrom": "user_followers",
          "tableTo": "users",
          "columnsFrom": [
            "follower_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "user_followers_followee_id_users_id_fk": {
          "name": "user_followers_followee_id_users_id_fk",
          "tableFrom": "user_followers",
          "tableTo": "users",
          "columnsFrom": [
            "followee_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "user_followers_follower_id_followee_id_pk": {
          "name": "user_followers_follower_id_followee_id_pk",
          "columns": [
            "follower_id",
            "followee_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "username": {
          "name": "username",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "password_hash": {
          "name": "password_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "bio": {
          "name": "bio",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "avatar_url": {
          "name": "avatar_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "location": {
          "name": "location",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "website": {
          "name": "website",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "company": {
          "name": "company",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_admin": {
          "name": "is_admin",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_verified": {
          "name": "email_verified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "two_factor_enabled": {
          "name": "two_factor_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "two_factor_secret": {
          "name": "two_factor_secret",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_login_at": {
          "name": "last_login_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "ai_config": {
          "name": "ai_config",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "users_username_unique": {
          "name": "users_username_unique",
          "nullsNotDistinct": false,
          "columns": [
            "username"
          ]
        },
        "users_email_unique": {
          "name": "users_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.deploy_keys": {
      "name": "deploy_keys",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "fingerprint": {
          "name": "fingerprint",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "read_only": {
          "name": "read_only",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "last_used_at": {
          "name": "last_used_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "deploy_keys_repository_id_repositories_id_fk": {
          "name": "deploy_keys_repository_id_repositories_id_fk",
          "tableFrom": "deploy_keys",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.branches": {
      "name": "branches",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_protected": {
          "name": "is_protected",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_default": {
          "name": "is_default",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "protection_rules": {
          "name": "protection_rules",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "branches_repo_name_idx": {
          "name": "branches_repo_name_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "branches_repository_id_repositories_id_fk": {
          "name": "branches_repository_id_repositories_id_fk",
          "tableFrom": "branches",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.commits": {
      "name": "commits",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "sha": {
          "name": "sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "author_name": {
          "name": "author_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "author_email": {
          "name": "author_email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "author_date": {
          "name": "author_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "committer_name": {
          "name": "committer_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "committer_email": {
          "name": "committer_email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "committer_date": {
          "name": "committer_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "parent_shas": {
          "name": "parent_shas",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "tree_sha": {
          "name": "tree_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "stats": {
          "name": "stats",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "signature": {
          "name": "signature",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_verified": {
          "name": "is_verified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "commits_repo_sha_idx": {
          "name": "commits_repo_sha_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "sha",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "commits_repo_idx": {
          "name": "commits_repo_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "commits_repository_id_repositories_id_fk": {
          "name": "commits_repository_id_repositories_id_fk",
          "tableFrom": "commits",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "commits_user_id_users_id_fk": {
          "name": "commits_user_id_users_id_fk",
          "tableFrom": "commits",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.releases": {
      "name": "releases",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "tag_id": {
          "name": "tag_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_draft": {
          "name": "is_draft",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_prerelease": {
          "name": "is_prerelease",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "author_id": {
          "name": "author_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "assets": {
          "name": "assets",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "download_count": {
          "name": "download_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "releases_repository_id_repositories_id_fk": {
          "name": "releases_repository_id_repositories_id_fk",
          "tableFrom": "releases",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "releases_tag_id_tags_id_fk": {
          "name": "releases_tag_id_tags_id_fk",
          "tableFrom": "releases",
          "tableTo": "tags",
          "columnsFrom": [
            "tag_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "releases_author_id_users_id_fk": {
          "name": "releases_author_id_users_id_fk",
          "tableFrom": "releases",
          "tableTo": "users",
          "columnsFrom": [
            "author_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.repositories": {
      "name": "repositories",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "owner_id": {
          "name": "owner_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "owner_type": {
          "name": "owner_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'user'"
        },
        "visibility": {
          "name": "visibility",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'public'"
        },
        "default_branch": {
          "name": "default_branch",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'main'"
        },
        "disk_path": {
          "name": "disk_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "ssh_clone_url": {
          "name": "ssh_clone_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "http_clone_url": {
          "name": "http_clone_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "website": {
          "name": "website",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "star_count": {
          "name": "star_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "fork_count": {
          "name": "fork_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "watch_count": {
          "name": "watch_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "open_issue_count": {
          "name": "open_issue_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "open_pr_count": {
          "name": "open_pr_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "size": {
          "name": "size",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "is_fork": {
          "name": "is_fork",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "forked_from_id": {
          "name": "forked_from_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_archived": {
          "name": "is_archived",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_template": {
          "name": "is_template",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_mirror": {
          "name": "is_mirror",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "mirror_url": {
          "name": "mirror_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_mirror_sync_at": {
          "name": "last_mirror_sync_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "mirror_sync_status": {
          "name": "mirror_sync_status",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "has_issues": {
          "name": "has_issues",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "has_wiki": {
          "name": "has_wiki",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "has_actions": {
          "name": "has_actions",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "allow_forking": {
          "name": "allow_forking",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "license_type": {
          "name": "license_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "topics": {
          "name": "topics",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "language": {
          "name": "language",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "languages": {
          "name": "languages",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_activity_at": {
          "name": "last_activity_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "repositories_owner_name_idx": {
          "name": "repositories_owner_name_idx",
          "columns": [
            {
              "expression": "owner_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "repositories_owner_slug_idx": {
          "name": "repositories_owner_slug_idx",
          "columns": [
            {
              "expression": "owner_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "repositories_owner_idx": {
          "name": "repositories_owner_idx",
          "columns": [
            {
              "expression": "owner_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "repositories_owner_id_users_id_fk": {
          "name": "repositories_owner_id_users_id_fk",
          "tableFrom": "repositories",
          "tableTo": "users",
          "columnsFrom": [
            "owner_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "repositories_forked_from_id_repositories_id_fk": {
          "name": "repositories_forked_from_id_repositories_id_fk",
          "tableFrom": "repositories",
          "tableTo": "repositories",
          "columnsFrom": [
            "forked_from_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.repository_collaborators": {
      "name": "repository_collaborators",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'developer'"
        },
        "added_by_id": {
          "name": "added_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "collaborators_repo_user_idx": {
          "name": "collaborators_repo_user_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "repository_collaborators_repository_id_repositories_id_fk": {
          "name": "repository_collaborators_repository_id_repositories_id_fk",
          "tableFrom": "repository_collaborators",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "repository_collaborators_user_id_users_id_fk": {
          "name": "repository_collaborators_user_id_users_id_fk",
          "tableFrom": "repository_collaborators",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "repository_collaborators_added_by_id_users_id_fk": {
          "name": "repository_collaborators_added_by_id_users_id_fk",
          "tableFrom": "repository_collaborators",
          "tableTo": "users",
          "columnsFrom": [
            "added_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.repository_stars": {
      "name": "repository_stars",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "stars_repo_user_idx": {
          "name": "stars_repo_user_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "repository_stars_repository_id_repositories_id_fk": {
          "name": "repository_stars_repository_id_repositories_id_fk",
          "tableFrom": "repository_stars",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "repository_stars_user_id_users_id_fk": {
          "name": "repository_stars_user_id_users_id_fk",
          "tableFrom": "repository_stars",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.repository_watchers": {
      "name": "repository_watchers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "watch_level": {
          "name": "watch_level",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'watching'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "watchers_repo_user_idx": {
          "name": "watchers_repo_user_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "repository_watchers_repository_id_repositories_id_fk": {
          "name": "repository_watchers_repository_id_repositories_id_fk",
          "tableFrom": "repository_watchers",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "repository_watchers_user_id_users_id_fk": {
          "name": "repository_watchers_user_id_users_id_fk",
          "tableFrom": "repository_watchers",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.tags": {
      "name": "tags",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "tagger_name": {
          "name": "tagger_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "tagger_email": {
          "name": "tagger_email",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "tagged_at": {
          "name": "tagged_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "is_release": {
          "name": "is_release",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "release_id": {
          "name": "release_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "tags_repo_name_idx": {
          "name": "tags_repo_name_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "tags_repository_id_repositories_id_fk": {
          "name": "tags_repository_id_repositories_id_fk",
          "tableFrom": "tags",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issue_assignees": {
      "name": "issue_assignees",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "issue_id": {
          "name": "issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "assigned_at": {
          "name": "assigned_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "issue_assignees_issue_id_issues_id_fk": {
          "name": "issue_assignees_issue_id_issues_id_fk",
          "tableFrom": "issue_assignees",
          "tableTo": "issues",
          "columnsFrom": [
            "issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "issue_assignees_user_id_users_id_fk": {
          "name": "issue_assignees_user_id_users_id_fk",
          "tableFrom": "issue_assignees",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issue_comments": {
      "name": "issue_comments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "issue_id": {
          "name": "issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "author_id": {
          "name": "author_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "reactions": {
          "name": "reactions",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_edited": {
          "name": "is_edited",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "edited_at": {
          "name": "edited_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "issue_comments_issue_idx": {
          "name": "issue_comments_issue_idx",
          "columns": [
            {
              "expression": "issue_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "issue_comments_issue_id_issues_id_fk": {
          "name": "issue_comments_issue_id_issues_id_fk",
          "tableFrom": "issue_comments",
          "tableTo": "issues",
          "columnsFrom": [
            "issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "issue_comments_author_id_users_id_fk": {
          "name": "issue_comments_author_id_users_id_fk",
          "tableFrom": "issue_comments",
          "tableTo": "users",
          "columnsFrom": [
            "author_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issue_labels": {
      "name": "issue_labels",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "issue_id": {
          "name": "issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "label_id": {
          "name": "label_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "issue_labels_issue_id_issues_id_fk": {
          "name": "issue_labels_issue_id_issues_id_fk",
          "tableFrom": "issue_labels",
          "tableTo": "issues",
          "columnsFrom": [
            "issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "issue_labels_label_id_labels_id_fk": {
          "name": "issue_labels_label_id_labels_id_fk",
          "tableFrom": "issue_labels",
          "tableTo": "labels",
          "columnsFrom": [
            "label_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issue_subscribers": {
      "name": "issue_subscribers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "issue_id": {
          "name": "issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "subscribed_at": {
          "name": "subscribed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "issue_subscribers_issue_id_issues_id_fk": {
          "name": "issue_subscribers_issue_id_issues_id_fk",
          "tableFrom": "issue_subscribers",
          "tableTo": "issues",
          "columnsFrom": [
            "issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "issue_subscribers_user_id_users_id_fk": {
          "name": "issue_subscribers_user_id_users_id_fk",
          "tableFrom": "issue_subscribers",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issues": {
      "name": "issues",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "number": {
          "name": "number",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "state": {
          "name": "state",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'open'"
        },
        "status_id": {
          "name": "status_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'issue'"
        },
        "parent_id": {
          "name": "parent_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "author_id": {
          "name": "author_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "assignee_id": {
          "name": "assignee_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "milestone_id": {
          "name": "milestone_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_pinned": {
          "name": "is_pinned",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_locked": {
          "name": "is_locked",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "lock_reason": {
          "name": "lock_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "comment_count": {
          "name": "comment_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "reactions": {
          "name": "reactions",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "closed_at": {
          "name": "closed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "closed_by_id": {
          "name": "closed_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "issues_repo_number_idx": {
          "name": "issues_repo_number_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "number",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "issues_repo_state_idx": {
          "name": "issues_repo_state_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "state",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "issues_author_idx": {
          "name": "issues_author_idx",
          "columns": [
            {
              "expression": "author_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "issues_assignee_idx": {
          "name": "issues_assignee_idx",
          "columns": [
            {
              "expression": "assignee_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "issues_repository_id_repositories_id_fk": {
          "name": "issues_repository_id_repositories_id_fk",
          "tableFrom": "issues",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "issues_status_id_issue_statuses_id_fk": {
          "name": "issues_status_id_issue_statuses_id_fk",
          "tableFrom": "issues",
          "tableTo": "issue_statuses",
          "columnsFrom": [
            "status_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "issues_author_id_users_id_fk": {
          "name": "issues_author_id_users_id_fk",
          "tableFrom": "issues",
          "tableTo": "users",
          "columnsFrom": [
            "author_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "issues_assignee_id_users_id_fk": {
          "name": "issues_assignee_id_users_id_fk",
          "tableFrom": "issues",
          "tableTo": "users",
          "columnsFrom": [
            "assignee_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "issues_closed_by_id_users_id_fk": {
          "name": "issues_closed_by_id_users_id_fk",
          "tableFrom": "issues",
          "tableTo": "users",
          "columnsFrom": [
            "closed_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.labels": {
      "name": "labels",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "color": {
          "name": "color",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'#6b7280'"
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "labels_repo_name_idx": {
          "name": "labels_repo_name_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "labels_repository_id_repositories_id_fk": {
          "name": "labels_repository_id_repositories_id_fk",
          "tableFrom": "labels",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.milestones": {
      "name": "milestones",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "state": {
          "name": "state",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'open'"
        },
        "due_date": {
          "name": "due_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "open_issue_count": {
          "name": "open_issue_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "closed_issue_count": {
          "name": "closed_issue_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "closed_at": {
          "name": "closed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "milestones_repository_id_repositories_id_fk": {
          "name": "milestones_repository_id_repositories_id_fk",
          "tableFrom": "milestones",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pull_request_assignees": {
      "name": "pull_request_assignees",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "assigned_at": {
          "name": "assigned_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pull_request_assignees_pull_request_id_pull_requests_id_fk": {
          "name": "pull_request_assignees_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pull_request_assignees",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pull_request_assignees_user_id_users_id_fk": {
          "name": "pull_request_assignees_user_id_users_id_fk",
          "tableFrom": "pull_request_assignees",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pull_request_checks": {
      "name": "pull_request_checks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "conclusion": {
          "name": "conclusion",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "head_sha": {
          "name": "head_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "external_id": {
          "name": "external_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "details_url": {
          "name": "details_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "output": {
          "name": "output",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "pr_checks_pr_idx": {
          "name": "pr_checks_pr_idx",
          "columns": [
            {
              "expression": "pull_request_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "pr_checks_head_sha_idx": {
          "name": "pr_checks_head_sha_idx",
          "columns": [
            {
              "expression": "head_sha",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "pull_request_checks_pull_request_id_pull_requests_id_fk": {
          "name": "pull_request_checks_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pull_request_checks",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pull_request_comments": {
      "name": "pull_request_comments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "review_id": {
          "name": "review_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "author_id": {
          "name": "author_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "line": {
          "name": "line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "side": {
          "name": "side",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "start_line": {
          "name": "start_line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "start_side": {
          "name": "start_side",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "original_commit_sha": {
          "name": "original_commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "original_line": {
          "name": "original_line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "in_reply_to_id": {
          "name": "in_reply_to_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "reactions": {
          "name": "reactions",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_resolved": {
          "name": "is_resolved",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "resolved_by_id": {
          "name": "resolved_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "resolved_at": {
          "name": "resolved_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "is_edited": {
          "name": "is_edited",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "edited_at": {
          "name": "edited_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "suggestion_content": {
          "name": "suggestion_content",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "suggestion_applied": {
          "name": "suggestion_applied",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "suggestion_applied_by_id": {
          "name": "suggestion_applied_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "suggestion_applied_at": {
          "name": "suggestion_applied_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "suggestion_commit_sha": {
          "name": "suggestion_commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "pr_comments_pr_idx": {
          "name": "pr_comments_pr_idx",
          "columns": [
            {
              "expression": "pull_request_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "pull_request_comments_pull_request_id_pull_requests_id_fk": {
          "name": "pull_request_comments_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pull_request_comments",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pull_request_comments_review_id_pull_request_reviews_id_fk": {
          "name": "pull_request_comments_review_id_pull_request_reviews_id_fk",
          "tableFrom": "pull_request_comments",
          "tableTo": "pull_request_reviews",
          "columnsFrom": [
            "review_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_request_comments_author_id_users_id_fk": {
          "name": "pull_request_comments_author_id_users_id_fk",
          "tableFrom": "pull_request_comments",
          "tableTo": "users",
          "columnsFrom": [
            "author_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_request_comments_in_reply_to_id_pull_request_comments_id_fk": {
          "name": "pull_request_comments_in_reply_to_id_pull_request_comments_id_fk",
          "tableFrom": "pull_request_comments",
          "tableTo": "pull_request_comments",
          "columnsFrom": [
            "in_reply_to_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_request_comments_resolved_by_id_users_id_fk": {
          "name": "pull_request_comments_resolved_by_id_users_id_fk",
          "tableFrom": "pull_request_comments",
          "tableTo": "users",
          "columnsFrom": [
            "resolved_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_request_comments_suggestion_applied_by_id_users_id_fk": {
          "name": "pull_request_comments_suggestion_applied_by_id_users_id_fk",
          "tableFrom": "pull_request_comments",
          "tableTo": "users",
          "columnsFrom": [
            "suggestion_applied_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pull_request_labels": {
      "name": "pull_request_labels",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "label_id": {
          "name": "label_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pull_request_labels_pull_request_id_pull_requests_id_fk": {
          "name": "pull_request_labels_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pull_request_labels",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pull_request_labels_label_id_labels_id_fk": {
          "name": "pull_request_labels_label_id_labels_id_fk",
          "tableFrom": "pull_request_labels",
          "tableTo": "labels",
          "columnsFrom": [
            "label_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pull_request_reviewers": {
      "name": "pull_request_reviewers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_required": {
          "name": "is_required",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "requested_at": {
          "name": "requested_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pull_request_reviewers_pull_request_id_pull_requests_id_fk": {
          "name": "pull_request_reviewers_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pull_request_reviewers",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pull_request_reviewers_user_id_users_id_fk": {
          "name": "pull_request_reviewers_user_id_users_id_fk",
          "tableFrom": "pull_request_reviewers",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pull_request_reviews": {
      "name": "pull_request_reviews",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "reviewer_id": {
          "name": "reviewer_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "state": {
          "name": "state",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "submitted_at": {
          "name": "submitted_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "dismissed_at": {
          "name": "dismissed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "dismissed_by_id": {
          "name": "dismissed_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "dismissal_reason": {
          "name": "dismissal_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "pr_reviews_pr_idx": {
          "name": "pr_reviews_pr_idx",
          "columns": [
            {
              "expression": "pull_request_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "pull_request_reviews_pull_request_id_pull_requests_id_fk": {
          "name": "pull_request_reviews_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pull_request_reviews",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pull_request_reviews_reviewer_id_users_id_fk": {
          "name": "pull_request_reviews_reviewer_id_users_id_fk",
          "tableFrom": "pull_request_reviews",
          "tableTo": "users",
          "columnsFrom": [
            "reviewer_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_request_reviews_dismissed_by_id_users_id_fk": {
          "name": "pull_request_reviews_dismissed_by_id_users_id_fk",
          "tableFrom": "pull_request_reviews",
          "tableTo": "users",
          "columnsFrom": [
            "dismissed_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pull_requests": {
      "name": "pull_requests",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "number": {
          "name": "number",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "state": {
          "name": "state",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'open'"
        },
        "author_id": {
          "name": "author_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "assignee_id": {
          "name": "assignee_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "milestone_id": {
          "name": "milestone_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "head_branch": {
          "name": "head_branch",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "head_sha": {
          "name": "head_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "head_repository_id": {
          "name": "head_repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "base_branch": {
          "name": "base_branch",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "base_sha": {
          "name": "base_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_draft": {
          "name": "is_draft",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_merged": {
          "name": "is_merged",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "merged_at": {
          "name": "merged_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "merged_by_id": {
          "name": "merged_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "merge_commit_sha": {
          "name": "merge_commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "merge_sha": {
          "name": "merge_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "merge_method": {
          "name": "merge_method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "additions": {
          "name": "additions",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "deletions": {
          "name": "deletions",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "changed_files": {
          "name": "changed_files",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "comment_count": {
          "name": "comment_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "review_count": {
          "name": "review_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "mergeable": {
          "name": "mergeable",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false
        },
        "mergeable_state": {
          "name": "mergeable_state",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "rebaseable": {
          "name": "rebaseable",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false
        },
        "maintainer_can_modify": {
          "name": "maintainer_can_modify",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "allow_auto_merge": {
          "name": "allow_auto_merge",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "auto_merge_method": {
          "name": "auto_merge_method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "auto_merge_enabled_by_id": {
          "name": "auto_merge_enabled_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "auto_merge_enabled_at": {
          "name": "auto_merge_enabled_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "state_id": {
          "name": "state_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "custom_state_changed_at": {
          "name": "custom_state_changed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "closed_at": {
          "name": "closed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "closed_by_id": {
          "name": "closed_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "prs_repo_number_idx": {
          "name": "prs_repo_number_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "number",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "prs_repo_state_idx": {
          "name": "prs_repo_state_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "state",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "prs_author_idx": {
          "name": "prs_author_idx",
          "columns": [
            {
              "expression": "author_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "pull_requests_repository_id_repositories_id_fk": {
          "name": "pull_requests_repository_id_repositories_id_fk",
          "tableFrom": "pull_requests",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pull_requests_author_id_users_id_fk": {
          "name": "pull_requests_author_id_users_id_fk",
          "tableFrom": "pull_requests",
          "tableTo": "users",
          "columnsFrom": [
            "author_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_requests_assignee_id_users_id_fk": {
          "name": "pull_requests_assignee_id_users_id_fk",
          "tableFrom": "pull_requests",
          "tableTo": "users",
          "columnsFrom": [
            "assignee_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_requests_head_repository_id_repositories_id_fk": {
          "name": "pull_requests_head_repository_id_repositories_id_fk",
          "tableFrom": "pull_requests",
          "tableTo": "repositories",
          "columnsFrom": [
            "head_repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_requests_merged_by_id_users_id_fk": {
          "name": "pull_requests_merged_by_id_users_id_fk",
          "tableFrom": "pull_requests",
          "tableTo": "users",
          "columnsFrom": [
            "merged_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_requests_auto_merge_enabled_by_id_users_id_fk": {
          "name": "pull_requests_auto_merge_enabled_by_id_users_id_fk",
          "tableFrom": "pull_requests",
          "tableTo": "users",
          "columnsFrom": [
            "auto_merge_enabled_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_requests_state_id_pr_state_definitions_id_fk": {
          "name": "pull_requests_state_id_pr_state_definitions_id_fk",
          "tableFrom": "pull_requests",
          "tableTo": "pr_state_definitions",
          "columnsFrom": [
            "state_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "pull_requests_closed_by_id_users_id_fk": {
          "name": "pull_requests_closed_by_id_users_id_fk",
          "tableFrom": "pull_requests",
          "tableTo": "users",
          "columnsFrom": [
            "closed_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.project_cards": {
      "name": "project_cards",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "column_id": {
          "name": "column_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "content_id": {
          "name": "content_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "content_type": {
          "name": "content_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "note": {
          "name": "note",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "creator_id": {
          "name": "creator_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "project_cards_column_id_project_columns_id_fk": {
          "name": "project_cards_column_id_project_columns_id_fk",
          "tableFrom": "project_cards",
          "tableTo": "project_columns",
          "columnsFrom": [
            "column_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "project_cards_creator_id_users_id_fk": {
          "name": "project_cards_creator_id_users_id_fk",
          "tableFrom": "project_cards",
          "tableTo": "users",
          "columnsFrom": [
            "creator_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.project_columns": {
      "name": "project_columns",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "project_id": {
          "name": "project_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "project_columns_project_id_projects_id_fk": {
          "name": "project_columns_project_id_projects_id_fk",
          "tableFrom": "project_columns",
          "tableTo": "projects",
          "columnsFrom": [
            "project_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.projects": {
      "name": "projects",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "number": {
          "name": "number",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "creator_id": {
          "name": "creator_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "projects_repository_id_repositories_id_fk": {
          "name": "projects_repository_id_repositories_id_fk",
          "tableFrom": "projects",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "projects_creator_id_users_id_fk": {
          "name": "projects_creator_id_users_id_fk",
          "tableFrom": "projects",
          "tableTo": "users",
          "columnsFrom": [
            "creator_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.scheduled_workflows": {
      "name": "scheduled_workflows",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "workflow_id": {
          "name": "workflow_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "cron_expression": {
          "name": "cron_expression",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "timezone": {
          "name": "timezone",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'UTC'"
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "last_run_at": {
          "name": "last_run_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "next_run_at": {
          "name": "next_run_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "scheduled_workflows_workflow_id_workflows_id_fk": {
          "name": "scheduled_workflows_workflow_id_workflows_id_fk",
          "tableFrom": "scheduled_workflows",
          "tableTo": "workflows",
          "columnsFrom": [
            "workflow_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_artifacts": {
      "name": "workflow_artifacts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "run_id": {
          "name": "run_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "job_id": {
          "name": "job_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "size_bytes": {
          "name": "size_bytes",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "storage_path": {
          "name": "storage_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "mime_type": {
          "name": "mime_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "download_count": {
          "name": "download_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "workflow_artifacts_run_id_workflow_runs_id_fk": {
          "name": "workflow_artifacts_run_id_workflow_runs_id_fk",
          "tableFrom": "workflow_artifacts",
          "tableTo": "workflow_runs",
          "columnsFrom": [
            "run_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "workflow_artifacts_job_id_workflow_jobs_id_fk": {
          "name": "workflow_artifacts_job_id_workflow_jobs_id_fk",
          "tableFrom": "workflow_artifacts",
          "tableTo": "workflow_jobs",
          "columnsFrom": [
            "job_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_jobs": {
      "name": "workflow_jobs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "run_id": {
          "name": "run_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'queued'"
        },
        "conclusion": {
          "name": "conclusion",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "runner_id": {
          "name": "runner_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "runner_name": {
          "name": "runner_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "runner_group_id": {
          "name": "runner_group_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "runner_group_name": {
          "name": "runner_group_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "container_id": {
          "name": "container_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "container_image": {
          "name": "container_image",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "needs": {
          "name": "needs",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "environment": {
          "name": "environment",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "environment_url": {
          "name": "environment_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "matrix": {
          "name": "matrix",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "workflow_jobs_run_idx": {
          "name": "workflow_jobs_run_idx",
          "columns": [
            {
              "expression": "run_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "workflow_jobs_run_id_workflow_runs_id_fk": {
          "name": "workflow_jobs_run_id_workflow_runs_id_fk",
          "tableFrom": "workflow_jobs",
          "tableTo": "workflow_runs",
          "columnsFrom": [
            "run_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_logs": {
      "name": "workflow_logs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "job_id": {
          "name": "job_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "step_id": {
          "name": "step_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "log_level": {
          "name": "log_level",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'info'"
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "timestamp": {
          "name": "timestamp",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "line_number": {
          "name": "line_number",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "workflow_logs_job_id_workflow_jobs_id_fk": {
          "name": "workflow_logs_job_id_workflow_jobs_id_fk",
          "tableFrom": "workflow_logs",
          "tableTo": "workflow_jobs",
          "columnsFrom": [
            "job_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "workflow_logs_step_id_workflow_steps_id_fk": {
          "name": "workflow_logs_step_id_workflow_steps_id_fk",
          "tableFrom": "workflow_logs",
          "tableTo": "workflow_steps",
          "columnsFrom": [
            "step_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_runs": {
      "name": "workflow_runs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "workflow_id": {
          "name": "workflow_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "run_number": {
          "name": "run_number",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "run_attempt": {
          "name": "run_attempt",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 1
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_title": {
          "name": "display_title",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'queued'"
        },
        "conclusion": {
          "name": "conclusion",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "event": {
          "name": "event",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "head_branch": {
          "name": "head_branch",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "head_sha": {
          "name": "head_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "base_branch": {
          "name": "base_branch",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "base_sha": {
          "name": "base_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "triggered_by_id": {
          "name": "triggered_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "workflow_config": {
          "name": "workflow_config",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "workflow_runs_workflow_idx": {
          "name": "workflow_runs_workflow_idx",
          "columns": [
            {
              "expression": "workflow_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "workflow_runs_repo_idx": {
          "name": "workflow_runs_repo_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "workflow_runs_status_idx": {
          "name": "workflow_runs_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "workflow_runs_workflow_id_workflows_id_fk": {
          "name": "workflow_runs_workflow_id_workflows_id_fk",
          "tableFrom": "workflow_runs",
          "tableTo": "workflows",
          "columnsFrom": [
            "workflow_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "workflow_runs_repository_id_repositories_id_fk": {
          "name": "workflow_runs_repository_id_repositories_id_fk",
          "tableFrom": "workflow_runs",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "workflow_runs_pull_request_id_pull_requests_id_fk": {
          "name": "workflow_runs_pull_request_id_pull_requests_id_fk",
          "tableFrom": "workflow_runs",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "workflow_runs_triggered_by_id_users_id_fk": {
          "name": "workflow_runs_triggered_by_id_users_id_fk",
          "tableFrom": "workflow_runs",
          "tableTo": "users",
          "columnsFrom": [
            "triggered_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_secrets": {
      "name": "workflow_secrets",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "encrypted_value": {
          "name": "encrypted_value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "environment": {
          "name": "environment",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "workflow_secrets_repository_id_repositories_id_fk": {
          "name": "workflow_secrets_repository_id_repositories_id_fk",
          "tableFrom": "workflow_secrets",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "workflow_secrets_created_by_id_users_id_fk": {
          "name": "workflow_secrets_created_by_id_users_id_fk",
          "tableFrom": "workflow_secrets",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_steps": {
      "name": "workflow_steps",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "job_id": {
          "name": "job_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "number": {
          "name": "number",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'queued'"
        },
        "conclusion": {
          "name": "conclusion",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "uses": {
          "name": "uses",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "run": {
          "name": "run",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "shell": {
          "name": "shell",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "working_directory": {
          "name": "working_directory",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "env": {
          "name": "env",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "with": {
          "name": "with",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "if": {
          "name": "if",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "continue_on_error": {
          "name": "continue_on_error",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "timeout_minutes": {
          "name": "timeout_minutes",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "workflow_steps_job_id_workflow_jobs_id_fk": {
          "name": "workflow_steps_job_id_workflow_jobs_id_fk",
          "tableFrom": "workflow_steps",
          "tableTo": "workflow_jobs",
          "columnsFrom": [
            "job_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_variables": {
      "name": "workflow_variables",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "environment": {
          "name": "environment",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "workflow_variables_repository_id_repositories_id_fk": {
          "name": "workflow_variables_repository_id_repositories_id_fk",
          "tableFrom": "workflow_variables",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "workflow_variables_created_by_id_users_id_fk": {
          "name": "workflow_variables_created_by_id_users_id_fk",
          "tableFrom": "workflow_variables",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflows": {
      "name": "workflows",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "state": {
          "name": "state",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'active'"
        },
        "badge_url": {
          "name": "badge_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "workflows_repo_idx": {
          "name": "workflows_repo_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "workflows_repository_id_repositories_id_fk": {
          "name": "workflows_repository_id_repositories_id_fk",
          "tableFrom": "workflows",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.wiki_pages": {
      "name": "wiki_pages",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "format": {
          "name": "format",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'markdown'"
        },
        "parent_id": {
          "name": "parent_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_editor_id": {
          "name": "last_editor_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "view_count": {
          "name": "view_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "wiki_pages_repository_id_repositories_id_fk": {
          "name": "wiki_pages_repository_id_repositories_id_fk",
          "tableFrom": "wiki_pages",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "wiki_pages_parent_id_wiki_pages_id_fk": {
          "name": "wiki_pages_parent_id_wiki_pages_id_fk",
          "tableFrom": "wiki_pages",
          "tableTo": "wiki_pages",
          "columnsFrom": [
            "parent_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "wiki_pages_last_editor_id_users_id_fk": {
          "name": "wiki_pages_last_editor_id_users_id_fk",
          "tableFrom": "wiki_pages",
          "tableTo": "users",
          "columnsFrom": [
            "last_editor_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.wiki_revisions": {
      "name": "wiki_revisions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "page_id": {
          "name": "page_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "author_id": {
          "name": "author_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "wiki_revisions_page_id_wiki_pages_id_fk": {
          "name": "wiki_revisions_page_id_wiki_pages_id_fk",
          "tableFrom": "wiki_revisions",
          "tableTo": "wiki_pages",
          "columnsFrom": [
            "page_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "wiki_revisions_author_id_users_id_fk": {
          "name": "wiki_revisions_author_id_users_id_fk",
          "tableFrom": "wiki_revisions",
          "tableTo": "users",
          "columnsFrom": [
            "author_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.organization_members": {
      "name": "organization_members",
      "schema": "",
      "columns": {
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'member'"
        },
        "custom_role_id": {
          "name": "custom_role_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "organization_members_organization_id_organizations_id_fk": {
          "name": "organization_members_organization_id_organizations_id_fk",
          "tableFrom": "organization_members",
          "tableTo": "organizations",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "organization_members_user_id_users_id_fk": {
          "name": "organization_members_user_id_users_id_fk",
          "tableFrom": "organization_members",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "organization_members_organization_id_user_id_pk": {
          "name": "organization_members_organization_id_user_id_pk",
          "columns": [
            "organization_id",
            "user_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.organizations": {
      "name": "organizations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "location": {
          "name": "location",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "website": {
          "name": "website",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "avatar_url": {
          "name": "avatar_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_verified": {
          "name": "is_verified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "organizations_name_unique": {
          "name": "organizations_name_unique",
          "nullsNotDistinct": false,
          "columns": [
            "name"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.custom_roles": {
      "name": "custom_roles",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "permissions": {
          "name": "permissions",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "custom_roles_organization_id_organizations_id_fk": {
          "name": "custom_roles_organization_id_organizations_id_fk",
          "tableFrom": "custom_roles",
          "tableTo": "organizations",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.team_members": {
      "name": "team_members",
      "schema": "",
      "columns": {
        "team_id": {
          "name": "team_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'member'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "team_members_team_id_teams_id_fk": {
          "name": "team_members_team_id_teams_id_fk",
          "tableFrom": "team_members",
          "tableTo": "teams",
          "columnsFrom": [
            "team_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "team_members_user_id_users_id_fk": {
          "name": "team_members_user_id_users_id_fk",
          "tableFrom": "team_members",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "team_members_team_id_user_id_pk": {
          "name": "team_members_team_id_user_id_pk",
          "columns": [
            "team_id",
            "user_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.team_repositories": {
      "name": "team_repositories",
      "schema": "",
      "columns": {
        "team_id": {
          "name": "team_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "permission": {
          "name": "permission",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'read'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "team_repositories_team_id_teams_id_fk": {
          "name": "team_repositories_team_id_teams_id_fk",
          "tableFrom": "team_repositories",
          "tableTo": "teams",
          "columnsFrom": [
            "team_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "team_repositories_repository_id_repositories_id_fk": {
          "name": "team_repositories_repository_id_repositories_id_fk",
          "tableFrom": "team_repositories",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "team_repositories_team_id_repository_id_pk": {
          "name": "team_repositories_team_id_repository_id_pk",
          "columns": [
            "team_id",
            "repository_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.teams": {
      "name": "teams",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "privacy": {
          "name": "privacy",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'visible'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "teams_organization_id_organizations_id_fk": {
          "name": "teams_organization_id_organizations_id_fk",
          "tableFrom": "teams",
          "tableTo": "organizations",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.activities": {
      "name": "activities",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "action": {
          "name": "action",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "ref_type": {
          "name": "ref_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ref_name": {
          "name": "ref_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "target_type": {
          "name": "target_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "target_id": {
          "name": "target_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "payload": {
          "name": "payload",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_public": {
          "name": "is_public",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "activities_user_idx": {
          "name": "activities_user_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "activities_repo_idx": {
          "name": "activities_repo_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "activities_created_idx": {
          "name": "activities_created_idx",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "activities_user_id_users_id_fk": {
          "name": "activities_user_id_users_id_fk",
          "tableFrom": "activities",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "activities_repository_id_repositories_id_fk": {
          "name": "activities_repository_id_repositories_id_fk",
          "tableFrom": "activities",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.audit_logs": {
      "name": "audit_logs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "action": {
          "name": "action",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "actor_type": {
          "name": "actor_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'user'"
        },
        "actor_id": {
          "name": "actor_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "actor_ip": {
          "name": "actor_ip",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "actor_user_agent": {
          "name": "actor_user_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "target_type": {
          "name": "target_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "target_id": {
          "name": "target_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "target_name": {
          "name": "target_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "data": {
          "name": "data",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "audit_logs_action_idx": {
          "name": "audit_logs_action_idx",
          "columns": [
            {
              "expression": "action",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "audit_logs_actor_idx": {
          "name": "audit_logs_actor_idx",
          "columns": [
            {
              "expression": "actor_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "audit_logs_created_idx": {
          "name": "audit_logs_created_idx",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "audit_logs_target_idx": {
          "name": "audit_logs_target_idx",
          "columns": [
            {
              "expression": "target_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "target_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "audit_logs_user_id_users_id_fk": {
          "name": "audit_logs_user_id_users_id_fk",
          "tableFrom": "audit_logs",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "audit_logs_repository_id_repositories_id_fk": {
          "name": "audit_logs_repository_id_repositories_id_fk",
          "tableFrom": "audit_logs",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notifications": {
      "name": "notifications",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "actor_id": {
          "name": "actor_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "subject_type": {
          "name": "subject_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "subject_id": {
          "name": "subject_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_read": {
          "name": "is_read",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "read_at": {
          "name": "read_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "is_archived": {
          "name": "is_archived",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "archived_at": {
          "name": "archived_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "notifications_user_read_idx": {
          "name": "notifications_user_read_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "is_read",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "notifications_user_idx": {
          "name": "notifications_user_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "notifications_user_id_users_id_fk": {
          "name": "notifications_user_id_users_id_fk",
          "tableFrom": "notifications",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "notifications_repository_id_repositories_id_fk": {
          "name": "notifications_repository_id_repositories_id_fk",
          "tableFrom": "notifications",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "notifications_actor_id_users_id_fk": {
          "name": "notifications_actor_id_users_id_fk",
          "tableFrom": "notifications",
          "tableTo": "users",
          "columnsFrom": [
            "actor_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.security_scans": {
      "name": "security_scans",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'queued'"
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "critical_count": {
          "name": "critical_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "high_count": {
          "name": "high_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "medium_count": {
          "name": "medium_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "low_count": {
          "name": "low_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "unknown_count": {
          "name": "unknown_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "logs": {
          "name": "logs",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "security_scans_repository_id_repositories_id_fk": {
          "name": "security_scans_repository_id_repositories_id_fk",
          "tableFrom": "security_scans",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.security_vulnerabilities": {
      "name": "security_vulnerabilities",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "scan_id": {
          "name": "scan_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "vulnerability_id": {
          "name": "vulnerability_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pkg_name": {
          "name": "pkg_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "installed_version": {
          "name": "installed_version",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "fixed_version": {
          "name": "fixed_version",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "severity": {
          "name": "severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "target": {
          "name": "target",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "class": {
          "name": "class",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "security_vulnerabilities_scan_id_security_scans_id_fk": {
          "name": "security_vulnerabilities_scan_id_security_scans_id_fk",
          "tableFrom": "security_vulnerabilities",
          "tableTo": "security_scans",
          "columnsFrom": [
            "scan_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.security_policies": {
      "name": "security_policies",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "enforcement_mode": {
          "name": "enforcement_mode",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'warn'"
        },
        "secret_blocked_types": {
          "name": "secret_blocked_types",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'"
        },
        "secret_min_severity": {
          "name": "secret_min_severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'HIGH'"
        },
        "license_allowed_types": {
          "name": "license_allowed_types",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'[\"permissive\"]'"
        },
        "license_blocked_licenses": {
          "name": "license_blocked_licenses",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'"
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "updated_by_id": {
          "name": "updated_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "security_policies_repository_id_repositories_id_fk": {
          "name": "security_policies_repository_id_repositories_id_fk",
          "tableFrom": "security_policies",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "security_policies_updated_by_id_users_id_fk": {
          "name": "security_policies_updated_by_id_users_id_fk",
          "tableFrom": "security_policies",
          "tableTo": "users",
          "columnsFrom": [
            "updated_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pipeline_runners": {
      "name": "pipeline_runners",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "os": {
          "name": "os",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "arch": {
          "name": "arch",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "version": {
          "name": "version",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'offline'"
        },
        "last_seen_at": {
          "name": "last_seen_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pipeline_runners_repository_id_repositories_id_fk": {
          "name": "pipeline_runners_repository_id_repositories_id_fk",
          "tableFrom": "pipeline_runners",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pr_stack_entries": {
      "name": "pr_stack_entries",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "stack_id": {
          "name": "stack_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "stack_order": {
          "name": "stack_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "parent_pr_id": {
          "name": "parent_pr_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pr_stack_entries_stack_id_pr_stacks_id_fk": {
          "name": "pr_stack_entries_stack_id_pr_stacks_id_fk",
          "tableFrom": "pr_stack_entries",
          "tableTo": "pr_stacks",
          "columnsFrom": [
            "stack_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_stack_entries_pull_request_id_pull_requests_id_fk": {
          "name": "pr_stack_entries_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pr_stack_entries",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_stack_entries_parent_pr_id_pull_requests_id_fk": {
          "name": "pr_stack_entries_parent_pr_id_pull_requests_id_fk",
          "tableFrom": "pr_stack_entries",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "parent_pr_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pr_stacks": {
      "name": "pr_stacks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "base_branch": {
          "name": "base_branch",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'active'"
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pr_stacks_repository_id_repositories_id_fk": {
          "name": "pr_stacks_repository_id_repositories_id_fk",
          "tableFrom": "pr_stacks",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_stacks_created_by_id_users_id_fk": {
          "name": "pr_stacks_created_by_id_users_id_fk",
          "tableFrom": "pr_stacks",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.merge_queue": {
      "name": "merge_queue",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "stack_id": {
          "name": "stack_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "priority": {
          "name": "priority",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "ci_status": {
          "name": "ci_status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'pending'"
        },
        "merge_method": {
          "name": "merge_method",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'merge'"
        },
        "delete_on_merge": {
          "name": "delete_on_merge",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "execution_branch": {
          "name": "execution_branch",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "attempt_count": {
          "name": "attempt_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_attempt_at": {
          "name": "last_attempt_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "added_by_id": {
          "name": "added_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "added_at": {
          "name": "added_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "queued_at": {
          "name": "queued_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "failure_reason": {
          "name": "failure_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "merge_queue_repository_id_repositories_id_fk": {
          "name": "merge_queue_repository_id_repositories_id_fk",
          "tableFrom": "merge_queue",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "merge_queue_pull_request_id_pull_requests_id_fk": {
          "name": "merge_queue_pull_request_id_pull_requests_id_fk",
          "tableFrom": "merge_queue",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "merge_queue_added_by_id_users_id_fk": {
          "name": "merge_queue_added_by_id_users_id_fk",
          "tableFrom": "merge_queue",
          "tableTo": "users",
          "columnsFrom": [
            "added_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.merge_queue_speculative_runs": {
      "name": "merge_queue_speculative_runs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_ids": {
          "name": "pull_request_ids",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "branch_name": {
          "name": "branch_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "base_branch": {
          "name": "base_branch",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "ci_url": {
          "name": "ci_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "failure_reason": {
          "name": "failure_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "merge_queue_speculative_runs_repository_id_repositories_id_fk": {
          "name": "merge_queue_speculative_runs_repository_id_repositories_id_fk",
          "tableFrom": "merge_queue_speculative_runs",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ai_review_suggestions": {
      "name": "ai_review_suggestions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "ai_review_id": {
          "name": "ai_review_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "line": {
          "name": "line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "end_line": {
          "name": "end_line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "severity": {
          "name": "severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "suggested_fix": {
          "name": "suggested_fix",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "explanation": {
          "name": "explanation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_applied": {
          "name": "is_applied",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_dismissed": {
          "name": "is_dismissed",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "applied_at": {
          "name": "applied_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "applied_by_id": {
          "name": "applied_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "dismissed_at": {
          "name": "dismissed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "dismissed_by_id": {
          "name": "dismissed_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "dismiss_reason": {
          "name": "dismiss_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "ai_review_suggestions_ai_review_id_ai_reviews_id_fk": {
          "name": "ai_review_suggestions_ai_review_id_ai_reviews_id_fk",
          "tableFrom": "ai_review_suggestions",
          "tableTo": "ai_reviews",
          "columnsFrom": [
            "ai_review_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "ai_review_suggestions_applied_by_id_users_id_fk": {
          "name": "ai_review_suggestions_applied_by_id_users_id_fk",
          "tableFrom": "ai_review_suggestions",
          "tableTo": "users",
          "columnsFrom": [
            "applied_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "ai_review_suggestions_dismissed_by_id_users_id_fk": {
          "name": "ai_review_suggestions_dismissed_by_id_users_id_fk",
          "tableFrom": "ai_review_suggestions",
          "tableTo": "users",
          "columnsFrom": [
            "dismissed_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ai_reviews": {
      "name": "ai_reviews",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "model": {
          "name": "model",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "stack_context": {
          "name": "stack_context",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "includes_stack_context": {
          "name": "includes_stack_context",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "overall_severity": {
          "name": "overall_severity",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "suggestions_count": {
          "name": "suggestions_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "tokens_used": {
          "name": "tokens_used",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "prompt_tokens": {
          "name": "prompt_tokens",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "completion_tokens": {
          "name": "completion_tokens",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "cost_cents": {
          "name": "cost_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "raw_response": {
          "name": "raw_response",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "triggered_by_id": {
          "name": "triggered_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "error_message": {
          "name": "error_message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "ai_reviews_pull_request_id_pull_requests_id_fk": {
          "name": "ai_reviews_pull_request_id_pull_requests_id_fk",
          "tableFrom": "ai_reviews",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "ai_reviews_triggered_by_id_users_id_fk": {
          "name": "ai_reviews_triggered_by_id_users_id_fk",
          "tableFrom": "ai_reviews",
          "tableTo": "users",
          "columnsFrom": [
            "triggered_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pr_metrics": {
      "name": "pr_metrics",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "author_id": {
          "name": "author_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "time_to_first_review": {
          "name": "time_to_first_review",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "time_to_approval": {
          "name": "time_to_approval",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "time_to_merge": {
          "name": "time_to_merge",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "total_cycle_time": {
          "name": "total_cycle_time",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "review_rounds": {
          "name": "review_rounds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "reviewers_count": {
          "name": "reviewers_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "comments_count": {
          "name": "comments_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "changes_requested_count": {
          "name": "changes_requested_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "lines_added": {
          "name": "lines_added",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "lines_removed": {
          "name": "lines_removed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "files_changed": {
          "name": "files_changed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "commits": {
          "name": "commits",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "is_stacked": {
          "name": "is_stacked",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "stack_position": {
          "name": "stack_position",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "pr_created_at": {
          "name": "pr_created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "first_review_at": {
          "name": "first_review_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "approved_at": {
          "name": "approved_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "merged_at": {
          "name": "merged_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pr_metrics_pull_request_id_pull_requests_id_fk": {
          "name": "pr_metrics_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pr_metrics",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_metrics_repository_id_repositories_id_fk": {
          "name": "pr_metrics_repository_id_repositories_id_fk",
          "tableFrom": "pr_metrics",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_metrics_author_id_users_id_fk": {
          "name": "pr_metrics_author_id_users_id_fk",
          "tableFrom": "pr_metrics",
          "tableTo": "users",
          "columnsFrom": [
            "author_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.repo_metrics": {
      "name": "repo_metrics",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "week_of": {
          "name": "week_of",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "prs_opened": {
          "name": "prs_opened",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "prs_merged": {
          "name": "prs_merged",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "prs_closed": {
          "name": "prs_closed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "avg_time_to_first_review": {
          "name": "avg_time_to_first_review",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "avg_time_to_merge": {
          "name": "avg_time_to_merge",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "avg_review_rounds": {
          "name": "avg_review_rounds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "avg_lines_changed": {
          "name": "avg_lines_changed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "avg_files_changed": {
          "name": "avg_files_changed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "stacked_prs": {
          "name": "stacked_prs",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "stacked_prs_percentage": {
          "name": "stacked_prs_percentage",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "active_authors": {
          "name": "active_authors",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "active_reviewers": {
          "name": "active_reviewers",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "repo_metrics_repository_id_repositories_id_fk": {
          "name": "repo_metrics_repository_id_repositories_id_fk",
          "tableFrom": "repo_metrics",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.review_metrics": {
      "name": "review_metrics",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "week_of": {
          "name": "week_of",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "prs_authored": {
          "name": "prs_authored",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "prs_authored_merged": {
          "name": "prs_authored_merged",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "avg_time_to_merge_authored": {
          "name": "avg_time_to_merge_authored",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "lines_authored_added": {
          "name": "lines_authored_added",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "lines_authored_removed": {
          "name": "lines_authored_removed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "prs_reviewed": {
          "name": "prs_reviewed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "avg_time_to_review": {
          "name": "avg_time_to_review",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "comments_given": {
          "name": "comments_given",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "approvals_given": {
          "name": "approvals_given",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "changes_requested_given": {
          "name": "changes_requested_given",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "review_metrics_user_id_users_id_fk": {
          "name": "review_metrics_user_id_users_id_fk",
          "tableFrom": "review_metrics",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "review_metrics_repository_id_repositories_id_fk": {
          "name": "review_metrics_repository_id_repositories_id_fk",
          "tableFrom": "review_metrics",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.slack_channel_mappings": {
      "name": "slack_channel_mappings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "workspace_id": {
          "name": "workspace_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "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
        },
        "notify_on": {
          "name": "notify_on",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'[\"pr_created\",\"pr_merged\",\"review_requested\",\"ci_failed\"]'"
        },
        "notify_branches": {
          "name": "notify_branches",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "notify_authors": {
          "name": "notify_authors",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "slack_channel_mappings_workspace_id_slack_workspaces_id_fk": {
          "name": "slack_channel_mappings_workspace_id_slack_workspaces_id_fk",
          "tableFrom": "slack_channel_mappings",
          "tableTo": "slack_workspaces",
          "columnsFrom": [
            "workspace_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "slack_channel_mappings_repository_id_repositories_id_fk": {
          "name": "slack_channel_mappings_repository_id_repositories_id_fk",
          "tableFrom": "slack_channel_mappings",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.slack_user_mappings": {
      "name": "slack_user_mappings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "workspace_id": {
          "name": "workspace_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "slack_user_id": {
          "name": "slack_user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "slack_username": {
          "name": "slack_username",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "dm_preferences": {
          "name": "dm_preferences",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'{\"review_requested\":true,\"pr_approved\":true,\"ci_failed\":true}'"
        },
        "dnd_enabled": {
          "name": "dnd_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "dnd_start": {
          "name": "dnd_start",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "dnd_end": {
          "name": "dnd_end",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "dnd_timezone": {
          "name": "dnd_timezone",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "slack_user_mappings_user_id_users_id_fk": {
          "name": "slack_user_mappings_user_id_users_id_fk",
          "tableFrom": "slack_user_mappings",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "slack_user_mappings_workspace_id_slack_workspaces_id_fk": {
          "name": "slack_user_mappings_workspace_id_slack_workspaces_id_fk",
          "tableFrom": "slack_user_mappings",
          "tableTo": "slack_workspaces",
          "columnsFrom": [
            "workspace_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.slack_workspaces": {
      "name": "slack_workspaces",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "team_id": {
          "name": "team_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "team_name": {
          "name": "team_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "team_domain": {
          "name": "team_domain",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "bot_user_id": {
          "name": "bot_user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "bot_access_token": {
          "name": "bot_access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "scopes": {
          "name": "scopes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "installed_by_id": {
          "name": "installed_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "installed_at": {
          "name": "installed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "last_used_at": {
          "name": "last_used_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "slack_workspaces_installed_by_id_users_id_fk": {
          "name": "slack_workspaces_installed_by_id_users_id_fk",
          "tableFrom": "slack_workspaces",
          "tableTo": "users",
          "columnsFrom": [
            "installed_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.webhook_deliveries": {
      "name": "webhook_deliveries",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "webhook_id": {
          "name": "webhook_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "event": {
          "name": "event",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "payload": {
          "name": "payload",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "response_code": {
          "name": "response_code",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "response_body": {
          "name": "response_body",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "duration_ms": {
          "name": "duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "request_headers": {
          "name": "request_headers",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "response_headers": {
          "name": "response_headers",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "webhook_deliveries_webhook_idx": {
          "name": "webhook_deliveries_webhook_idx",
          "columns": [
            {
              "expression": "webhook_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "webhook_deliveries_created_idx": {
          "name": "webhook_deliveries_created_idx",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "webhook_deliveries_webhook_id_webhooks_id_fk": {
          "name": "webhook_deliveries_webhook_id_webhooks_id_fk",
          "tableFrom": "webhook_deliveries",
          "tableTo": "webhooks",
          "columnsFrom": [
            "webhook_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.webhooks": {
      "name": "webhooks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'generic'"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "secret": {
          "name": "secret",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "events": {
          "name": "events",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "content_type": {
          "name": "content_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'json'"
        },
        "delivery_count": {
          "name": "delivery_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_delivery_status": {
          "name": "last_delivery_status",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_delivery_at": {
          "name": "last_delivery_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "webhooks_repo_idx": {
          "name": "webhooks_repo_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "webhooks_repository_id_repositories_id_fk": {
          "name": "webhooks_repository_id_repositories_id_fk",
          "tableFrom": "webhooks",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "webhooks_created_by_id_users_id_fk": {
          "name": "webhooks_created_by_id_users_id_fk",
          "tableFrom": "webhooks",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.branch_protection": {
      "name": "branch_protection",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pattern": {
          "name": "pattern",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "requires_pr": {
          "name": "requires_pr",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "required_approvals": {
          "name": "required_approvals",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "dismiss_stale_reviews": {
          "name": "dismiss_stale_reviews",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "require_code_owner_reviews": {
          "name": "require_code_owner_reviews",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "allow_force_pushes": {
          "name": "allow_force_pushes",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "branch_protection_repository_id_repositories_id_fk": {
          "name": "branch_protection_repository_id_repositories_id_fk",
          "tableFrom": "branch_protection",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "branch_protection_created_by_id_users_id_fk": {
          "name": "branch_protection_created_by_id_users_id_fk",
          "tableFrom": "branch_protection",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.system_config": {
      "name": "system_config",
      "schema": "",
      "columns": {
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_by_id": {
          "name": "updated_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "system_config_updated_by_id_users_id_fk": {
          "name": "system_config_updated_by_id_users_id_fk",
          "tableFrom": "system_config",
          "tableTo": "users",
          "columnsFrom": [
            "updated_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.inbox_sections": {
      "name": "inbox_sections",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "icon": {
          "name": "icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "color": {
          "name": "color",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "filters": {
          "name": "filters",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "is_default": {
          "name": "is_default",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_collapsed": {
          "name": "is_collapsed",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "show_count": {
          "name": "show_count",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "inbox_sections_user_id_users_id_fk": {
          "name": "inbox_sections_user_id_users_id_fk",
          "tableFrom": "inbox_sections",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.shared_inbox_sections": {
      "name": "shared_inbox_sections",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "section_id": {
          "name": "section_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "shared_with_user_id": {
          "name": "shared_with_user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "shared_with_team_id": {
          "name": "shared_with_team_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "permission": {
          "name": "permission",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'view'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "shared_inbox_sections_section_id_inbox_sections_id_fk": {
          "name": "shared_inbox_sections_section_id_inbox_sections_id_fk",
          "tableFrom": "shared_inbox_sections",
          "tableTo": "inbox_sections",
          "columnsFrom": [
            "section_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "shared_inbox_sections_shared_with_user_id_users_id_fk": {
          "name": "shared_inbox_sections_shared_with_user_id_users_id_fk",
          "tableFrom": "shared_inbox_sections",
          "tableTo": "users",
          "columnsFrom": [
            "shared_with_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.automation_executions": {
      "name": "automation_executions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "rule_id": {
          "name": "rule_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "triggered_by_id": {
          "name": "triggered_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "triggered_by_type": {
          "name": "triggered_by_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "trigger_event": {
          "name": "trigger_event",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "conditions_matched": {
          "name": "conditions_matched",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false
        },
        "actions_executed": {
          "name": "actions_executed",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "error_message": {
          "name": "error_message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "duration_ms": {
          "name": "duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "automation_executions_rule_id_automation_rules_id_fk": {
          "name": "automation_executions_rule_id_automation_rules_id_fk",
          "tableFrom": "automation_executions",
          "tableTo": "automation_rules",
          "columnsFrom": [
            "rule_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.automation_rules": {
      "name": "automation_rules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "trigger": {
          "name": "trigger",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "conditions": {
          "name": "conditions",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "actions": {
          "name": "actions",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "priority": {
          "name": "priority",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "run_count": {
          "name": "run_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_run_at": {
          "name": "last_run_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "automation_rules_repository_id_repositories_id_fk": {
          "name": "automation_rules_repository_id_repositories_id_fk",
          "tableFrom": "automation_rules",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "automation_rules_created_by_id_users_id_fk": {
          "name": "automation_rules_created_by_id_users_id_fk",
          "tableFrom": "automation_rules",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ai_codebase_context": {
      "name": "ai_codebase_context",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "context_type": {
          "name": "context_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "examples": {
          "name": "examples",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "anti_patterns": {
          "name": "anti_patterns",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_auto_detected": {
          "name": "is_auto_detected",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "confidence": {
          "name": "confidence",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "ai_codebase_context_repository_id_repositories_id_fk": {
          "name": "ai_codebase_context_repository_id_repositories_id_fk",
          "tableFrom": "ai_codebase_context",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ai_review_rule_templates": {
      "name": "ai_review_rule_templates",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "rule_type": {
          "name": "rule_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "ai_prompt": {
          "name": "ai_prompt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "regex_pattern": {
          "name": "regex_pattern",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "severity": {
          "name": "severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "file_globs": {
          "name": "file_globs",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "languages": {
          "name": "languages",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_built_in": {
          "name": "is_built_in",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "usage_count": {
          "name": "usage_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ai_review_rules": {
      "name": "ai_review_rules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "rule_type": {
          "name": "rule_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'ai_prompt'"
        },
        "ai_prompt": {
          "name": "ai_prompt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "regex_pattern": {
          "name": "regex_pattern",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "severity": {
          "name": "severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'info'"
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "file_globs": {
          "name": "file_globs",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "exclude_globs": {
          "name": "exclude_globs",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "languages": {
          "name": "languages",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "is_auto_fix": {
          "name": "is_auto_fix",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "priority": {
          "name": "priority",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "match_count": {
          "name": "match_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_match_at": {
          "name": "last_match_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "ai_review_rules_repository_id_repositories_id_fk": {
          "name": "ai_review_rules_repository_id_repositories_id_fk",
          "tableFrom": "ai_review_rules",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "ai_review_rules_created_by_id_users_id_fk": {
          "name": "ai_review_rules_created_by_id_users_id_fk",
          "tableFrom": "ai_review_rules",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.email_digest_settings": {
      "name": "email_digest_settings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "digest_type": {
          "name": "digest_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'none'"
        },
        "digest_time": {
          "name": "digest_time",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'09:00'"
        },
        "digest_day": {
          "name": "digest_day",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "timezone": {
          "name": "timezone",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'UTC'"
        },
        "last_sent_at": {
          "name": "last_sent_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "email_digest_settings_user_id_users_id_fk": {
          "name": "email_digest_settings_user_id_users_id_fk",
          "tableFrom": "email_digest_settings",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notification_preferences": {
      "name": "notification_preferences",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "event_type": {
          "name": "event_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email_enabled": {
          "name": "email_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "slack_enabled": {
          "name": "slack_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "in_app_enabled": {
          "name": "in_app_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "browser_push_enabled": {
          "name": "browser_push_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "notification_preferences_user_id_users_id_fk": {
          "name": "notification_preferences_user_id_users_id_fk",
          "tableFrom": "notification_preferences",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "notification_preferences_repository_id_repositories_id_fk": {
          "name": "notification_preferences_repository_id_repositories_id_fk",
          "tableFrom": "notification_preferences",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notification_quiet_hours": {
      "name": "notification_quiet_hours",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "start_time": {
          "name": "start_time",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'22:00'"
        },
        "end_time": {
          "name": "end_time",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'08:00'"
        },
        "timezone": {
          "name": "timezone",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'UTC'"
        },
        "days_of_week": {
          "name": "days_of_week",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'0,1,2,3,4,5,6'"
        },
        "allow_urgent": {
          "name": "allow_urgent",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "notification_quiet_hours_user_id_users_id_fk": {
          "name": "notification_quiet_hours_user_id_users_id_fk",
          "tableFrom": "notification_quiet_hours",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.push_subscriptions": {
      "name": "push_subscriptions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "endpoint": {
          "name": "endpoint",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "p256dh_key": {
          "name": "p256dh_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "auth_key": {
          "name": "auth_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_agent": {
          "name": "user_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "last_used_at": {
          "name": "last_used_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "push_subscriptions_user_id_users_id_fk": {
          "name": "push_subscriptions_user_id_users_id_fk",
          "tableFrom": "push_subscriptions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sso_configs": {
      "name": "sso_configs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'oidc'"
        },
        "issuer": {
          "name": "issuer",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "client_id": {
          "name": "client_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "client_secret": {
          "name": "client_secret",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "scopes": {
          "name": "scopes",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'openid,profile,email'"
        },
        "authorization_url": {
          "name": "authorization_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "token_url": {
          "name": "token_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "userinfo_url": {
          "name": "userinfo_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "jwks_uri": {
          "name": "jwks_uri",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "auto_create_users": {
          "name": "auto_create_users",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "allowed_domains": {
          "name": "allowed_domains",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "default_role": {
          "name": "default_role",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'member'"
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "sso_configs_organization_id_organizations_id_fk": {
          "name": "sso_configs_organization_id_organizations_id_fk",
          "tableFrom": "sso_configs",
          "tableTo": "organizations",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.repository_path_permissions": {
      "name": "repository_path_permissions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path_pattern": {
          "name": "path_pattern",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "team_id": {
          "name": "team_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "permission": {
          "name": "permission",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'write'"
        },
        "require_approval": {
          "name": "require_approval",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'false'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "repository_path_permissions_repository_id_repositories_id_fk": {
          "name": "repository_path_permissions_repository_id_repositories_id_fk",
          "tableFrom": "repository_path_permissions",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "repository_path_permissions_user_id_users_id_fk": {
          "name": "repository_path_permissions_user_id_users_id_fk",
          "tableFrom": "repository_path_permissions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "repository_path_permissions_team_id_teams_id_fk": {
          "name": "repository_path_permissions_team_id_teams_id_fk",
          "tableFrom": "repository_path_permissions",
          "tableTo": "teams",
          "columnsFrom": [
            "team_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pr_state_definitions": {
      "name": "pr_state_definitions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "color": {
          "name": "color",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'#6B7280'"
        },
        "icon": {
          "name": "icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "is_default": {
          "name": "is_default",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_final": {
          "name": "is_final",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "allow_merge": {
          "name": "allow_merge",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "require_code_owner": {
          "name": "require_code_owner",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pr_state_definitions_repository_id_repositories_id_fk": {
          "name": "pr_state_definitions_repository_id_repositories_id_fk",
          "tableFrom": "pr_state_definitions",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pr_state_reviewers": {
      "name": "pr_state_reviewers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "state_definition_id": {
          "name": "state_definition_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "team_id": {
          "name": "team_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "required_count": {
          "name": "required_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pr_state_reviewers_state_definition_id_pr_state_definitions_id_fk": {
          "name": "pr_state_reviewers_state_definition_id_pr_state_definitions_id_fk",
          "tableFrom": "pr_state_reviewers",
          "tableTo": "pr_state_definitions",
          "columnsFrom": [
            "state_definition_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_state_reviewers_user_id_users_id_fk": {
          "name": "pr_state_reviewers_user_id_users_id_fk",
          "tableFrom": "pr_state_reviewers",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_state_reviewers_team_id_teams_id_fk": {
          "name": "pr_state_reviewers_team_id_teams_id_fk",
          "tableFrom": "pr_state_reviewers",
          "tableTo": "teams",
          "columnsFrom": [
            "team_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pr_state_transitions": {
      "name": "pr_state_transitions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "from_state": {
          "name": "from_state",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "to_state": {
          "name": "to_state",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "changed_by_id": {
          "name": "changed_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pr_state_transitions_changed_by_id_users_id_fk": {
          "name": "pr_state_transitions_changed_by_id_users_id_fk",
          "tableFrom": "pr_state_transitions",
          "tableTo": "users",
          "columnsFrom": [
            "changed_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issue_statuses": {
      "name": "issue_statuses",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "color": {
          "name": "color",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'#808080'"
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'open'"
        },
        "is_default": {
          "name": "is_default",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "issue_statuses_repository_id_repositories_id_fk": {
          "name": "issue_statuses_repository_id_repositories_id_fk",
          "tableFrom": "issue_statuses",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.custom_field_definitions": {
      "name": "custom_field_definitions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "options": {
          "name": "options",
          "type": "json",
          "primaryKey": false,
          "notNull": false
        },
        "required": {
          "name": "required",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "custom_field_definitions_repository_id_repositories_id_fk": {
          "name": "custom_field_definitions_repository_id_repositories_id_fk",
          "tableFrom": "custom_field_definitions",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issue_custom_field_values": {
      "name": "issue_custom_field_values",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "issue_id": {
          "name": "issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "field_id": {
          "name": "field_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "issue_custom_field_values_issue_id_issues_id_fk": {
          "name": "issue_custom_field_values_issue_id_issues_id_fk",
          "tableFrom": "issue_custom_field_values",
          "tableTo": "issues",
          "columnsFrom": [
            "issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "issue_custom_field_values_field_id_custom_field_definitions_id_fk": {
          "name": "issue_custom_field_values_field_id_custom_field_definitions_id_fk",
          "tableFrom": "issue_custom_field_values",
          "tableTo": "custom_field_definitions",
          "columnsFrom": [
            "field_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.auto_merge_rules": {
      "name": "auto_merge_rules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "match_labels": {
          "name": "match_labels",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "required_labels": {
          "name": "required_labels",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "required_checks": {
          "name": "required_checks",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "min_approvals": {
          "name": "min_approvals",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "require_code_owner": {
          "name": "require_code_owner",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "allow_draft": {
          "name": "allow_draft",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "min_time_in_queue_minutes": {
          "name": "min_time_in_queue_minutes",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "merge_method": {
          "name": "merge_method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "match_count": {
          "name": "match_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_matched_at": {
          "name": "last_matched_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "last_mismatch_reason": {
          "name": "last_mismatch_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "auto_merge_rules_repository_id_repositories_id_fk": {
          "name": "auto_merge_rules_repository_id_repositories_id_fk",
          "tableFrom": "auto_merge_rules",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "auto_merge_rules_created_by_id_users_id_fk": {
          "name": "auto_merge_rules_created_by_id_users_id_fk",
          "tableFrom": "auto_merge_rules",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.external_ci_integrations": {
      "name": "external_ci_integrations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token_hash": {
          "name": "token_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "last_used_at": {
          "name": "last_used_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "external_ci_integrations_repository_id_repositories_id_fk": {
          "name": "external_ci_integrations_repository_id_repositories_id_fk",
          "tableFrom": "external_ci_integrations",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "external_ci_integrations_created_by_id_users_id_fk": {
          "name": "external_ci_integrations_created_by_id_users_id_fk",
          "tableFrom": "external_ci_integrations",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.review_requirements": {
      "name": "review_requirements",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "min_approvals": {
          "name": "min_approvals",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "require_code_owner": {
          "name": "require_code_owner",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "require_team_lead": {
          "name": "require_team_lead",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "dismiss_stale_reviews": {
          "name": "dismiss_stale_reviews",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "require_rereview_on_push": {
          "name": "require_rereview_on_push",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "review_requirements_repository_id_repositories_id_fk": {
          "name": "review_requirements_repository_id_repositories_id_fk",
          "tableFrom": "review_requirements",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "review_requirements_created_by_id_users_id_fk": {
          "name": "review_requirements_created_by_id_users_id_fk",
          "tableFrom": "review_requirements",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.reviewer_rules": {
      "name": "reviewer_rules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "rule_type": {
          "name": "rule_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "target_id": {
          "name": "target_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "count": {
          "name": "count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "path_pattern": {
          "name": "path_pattern",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_required": {
          "name": "is_required",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "reviewer_rules_repository_id_repositories_id_fk": {
          "name": "reviewer_rules_repository_id_repositories_id_fk",
          "tableFrom": "reviewer_rules",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "reviewer_rules_created_by_id_users_id_fk": {
          "name": "reviewer_rules_created_by_id_users_id_fk",
          "tableFrom": "reviewer_rules",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.api_change_detections": {
      "name": "api_change_detections",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "change_type": {
          "name": "change_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "method": {
          "name": "method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "breaking": {
          "name": "breaking",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "details": {
          "name": "details",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "affected_files": {
          "name": "affected_files",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "api_change_detections_pull_request_id_pull_requests_id_fk": {
          "name": "api_change_detections_pull_request_id_pull_requests_id_fk",
          "tableFrom": "api_change_detections",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.breaking_changes": {
      "name": "breaking_changes",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "change_type": {
          "name": "change_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "severity": {
          "name": "severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "affected_files": {
          "name": "affected_files",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "suggested_action": {
          "name": "suggested_action",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "acknowledged": {
          "name": "acknowledged",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "breaking_changes_pull_request_id_pull_requests_id_fk": {
          "name": "breaking_changes_pull_request_id_pull_requests_id_fk",
          "tableFrom": "breaking_changes",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.change_set_items": {
      "name": "change_set_items",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "change_set_id": {
          "name": "change_set_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "change_set_items_change_set_id_change_sets_id_fk": {
          "name": "change_set_items_change_set_id_change_sets_id_fk",
          "tableFrom": "change_set_items",
          "tableTo": "change_sets",
          "columnsFrom": [
            "change_set_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "change_set_items_pull_request_id_pull_requests_id_fk": {
          "name": "change_set_items_pull_request_id_pull_requests_id_fk",
          "tableFrom": "change_set_items",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "change_set_items_repository_id_repositories_id_fk": {
          "name": "change_set_items_repository_id_repositories_id_fk",
          "tableFrom": "change_set_items",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.change_sets": {
      "name": "change_sets",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "change_sets_created_by_id_users_id_fk": {
          "name": "change_sets_created_by_id_users_id_fk",
          "tableFrom": "change_sets",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.chat_integrations": {
      "name": "chat_integrations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "webhook_url": {
          "name": "webhook_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "api_token": {
          "name": "api_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "channel_id": {
          "name": "channel_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "events": {
          "name": "events",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.cloud_configs": {
      "name": "cloud_configs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "region": {
          "name": "region",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "credentials": {
          "name": "credentials",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "settings": {
          "name": "settings",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "cloud_configs_repository_id_repositories_id_fk": {
          "name": "cloud_configs_repository_id_repositories_id_fk",
          "tableFrom": "cloud_configs",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.code_quality_configs": {
      "name": "code_quality_configs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "project_key": {
          "name": "project_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "api_token": {
          "name": "api_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "server_url": {
          "name": "server_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "webhook_secret": {
          "name": "webhook_secret",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "report_on_pr": {
          "name": "report_on_pr",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "block_on_fail": {
          "name": "block_on_fail",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "min_coverage": {
          "name": "min_coverage",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "code_quality_configs_repository_id_repositories_id_fk": {
          "name": "code_quality_configs_repository_id_repositories_id_fk",
          "tableFrom": "code_quality_configs",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.code_quality_issues": {
      "name": "code_quality_issues",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "issue_type": {
          "name": "issue_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "severity": {
          "name": "severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "file": {
          "name": "file",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "line": {
          "name": "line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "rule": {
          "name": "rule",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "effort": {
          "name": "effort",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'open'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "code_quality_issues_repository_id_repositories_id_fk": {
          "name": "code_quality_issues_repository_id_repositories_id_fk",
          "tableFrom": "code_quality_issues",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.coverage_reports": {
      "name": "coverage_reports",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "coverage": {
          "name": "coverage",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "lines_covered": {
          "name": "lines_covered",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "lines_total": {
          "name": "lines_total",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "branch_coverage": {
          "name": "branch_coverage",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "delta": {
          "name": "delta",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "report_url": {
          "name": "report_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "coverage_reports_repository_id_repositories_id_fk": {
          "name": "coverage_reports_repository_id_repositories_id_fk",
          "tableFrom": "coverage_reports",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.cross_repo_issue_links": {
      "name": "cross_repo_issue_links",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "source_issue_id": {
          "name": "source_issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "target_issue_id": {
          "name": "target_issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "link_type": {
          "name": "link_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "cross_repo_issue_links_source_issue_id_issues_id_fk": {
          "name": "cross_repo_issue_links_source_issue_id_issues_id_fk",
          "tableFrom": "cross_repo_issue_links",
          "tableTo": "issues",
          "columnsFrom": [
            "source_issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "cross_repo_issue_links_target_issue_id_issues_id_fk": {
          "name": "cross_repo_issue_links_target_issue_id_issues_id_fk",
          "tableFrom": "cross_repo_issue_links",
          "tableTo": "issues",
          "columnsFrom": [
            "target_issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.custom_dashboards": {
      "name": "custom_dashboards",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_public": {
          "name": "is_public",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "layout": {
          "name": "layout",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "custom_dashboards_user_id_users_id_fk": {
          "name": "custom_dashboards_user_id_users_id_fk",
          "tableFrom": "custom_dashboards",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.dashboard_widgets": {
      "name": "dashboard_widgets",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "dashboard_id": {
          "name": "dashboard_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "widget_type": {
          "name": "widget_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "config": {
          "name": "config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "dashboard_widgets_dashboard_id_custom_dashboards_id_fk": {
          "name": "dashboard_widgets_dashboard_id_custom_dashboards_id_fk",
          "tableFrom": "dashboard_widgets",
          "tableTo": "custom_dashboards",
          "columnsFrom": [
            "dashboard_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.cloud_deployments": {
      "name": "cloud_deployments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "config_id": {
          "name": "config_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "environment": {
          "name": "environment",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "logs": {
          "name": "logs",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "cloud_deployments_config_id_cloud_configs_id_fk": {
          "name": "cloud_deployments_config_id_cloud_configs_id_fk",
          "tableFrom": "cloud_deployments",
          "tableTo": "cloud_configs",
          "columnsFrom": [
            "config_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.email_settings": {
      "name": "email_settings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "smtp_host": {
          "name": "smtp_host",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "smtp_port": {
          "name": "smtp_port",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "smtp_user": {
          "name": "smtp_user",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "smtp_pass": {
          "name": "smtp_pass",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "from_address": {
          "name": "from_address",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "from_name": {
          "name": "from_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.external_builds": {
      "name": "external_builds",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "config_id": {
          "name": "config_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "external_build_id": {
          "name": "external_build_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "build_number": {
          "name": "build_number",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "external_builds_config_id_external_ci_configs_id_fk": {
          "name": "external_builds_config_id_external_ci_configs_id_fk",
          "tableFrom": "external_builds",
          "tableTo": "external_ci_configs",
          "columnsFrom": [
            "config_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.external_ci_configs": {
      "name": "external_ci_configs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "base_url": {
          "name": "base_url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "api_token": {
          "name": "api_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "project_id": {
          "name": "project_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "webhook_secret": {
          "name": "webhook_secret",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "sync_status": {
          "name": "sync_status",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "external_ci_configs_repository_id_repositories_id_fk": {
          "name": "external_ci_configs_repository_id_repositories_id_fk",
          "tableFrom": "external_ci_configs",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.file_approvals": {
      "name": "file_approvals",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "approved_by_id": {
          "name": "approved_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "approved_at": {
          "name": "approved_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "comment": {
          "name": "comment",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "file_approvals_pull_request_id_pull_requests_id_fk": {
          "name": "file_approvals_pull_request_id_pull_requests_id_fk",
          "tableFrom": "file_approvals",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "file_approvals_approved_by_id_users_id_fk": {
          "name": "file_approvals_approved_by_id_users_id_fk",
          "tableFrom": "file_approvals",
          "tableTo": "users",
          "columnsFrom": [
            "approved_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.file_hotspots": {
      "name": "file_hotspots",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "file_path": {
          "name": "file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "change_count": {
          "name": "change_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "bug_count": {
          "name": "bug_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "review_count": {
          "name": "review_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "complexity_score": {
          "name": "complexity_score",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "last_modified": {
          "name": "last_modified",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "calculated_at": {
          "name": "calculated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "file_hotspots_repository_id_repositories_id_fk": {
          "name": "file_hotspots_repository_id_repositories_id_fk",
          "tableFrom": "file_hotspots",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ip_allow_lists": {
      "name": "ip_allow_lists",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "cidr_block": {
          "name": "cidr_block",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issue_tracker_configs": {
      "name": "issue_tracker_configs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "api_url": {
          "name": "api_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "api_token": {
          "name": "api_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "project_key": {
          "name": "project_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "webhook_secret": {
          "name": "webhook_secret",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "sync_to_external": {
          "name": "sync_to_external",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "sync_from_external": {
          "name": "sync_from_external",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "issue_tracker_configs_repository_id_repositories_id_fk": {
          "name": "issue_tracker_configs_repository_id_repositories_id_fk",
          "tableFrom": "issue_tracker_configs",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.issue_tracker_links": {
      "name": "issue_tracker_links",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "config_id": {
          "name": "config_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "local_issue_id": {
          "name": "local_issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "external_id": {
          "name": "external_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "external_key": {
          "name": "external_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "external_url": {
          "name": "external_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_sync_at": {
          "name": "last_sync_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "issue_tracker_links_config_id_issue_tracker_configs_id_fk": {
          "name": "issue_tracker_links_config_id_issue_tracker_configs_id_fk",
          "tableFrom": "issue_tracker_links",
          "tableTo": "issue_tracker_configs",
          "columnsFrom": [
            "config_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "issue_tracker_links_local_issue_id_issues_id_fk": {
          "name": "issue_tracker_links_local_issue_id_issues_id_fk",
          "tableFrom": "issue_tracker_links",
          "tableTo": "issues",
          "columnsFrom": [
            "local_issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.license_scans": {
      "name": "license_scans",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "package_name": {
          "name": "package_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "package_version": {
          "name": "package_version",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "license": {
          "name": "license",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "license_type": {
          "name": "license_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_compliant": {
          "name": "is_compliant",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true
        },
        "policy_violation": {
          "name": "policy_violation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "license_scans_repository_id_repositories_id_fk": {
          "name": "license_scans_repository_id_repositories_id_fk",
          "tableFrom": "license_scans",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.merge_gates": {
      "name": "merge_gates",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "gate_type": {
          "name": "gate_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "config": {
          "name": "config",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "condition_script": {
          "name": "condition_script",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "merge_gates_repository_id_repositories_id_fk": {
          "name": "merge_gates_repository_id_repositories_id_fk",
          "tableFrom": "merge_gates",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.metric_snapshots": {
      "name": "metric_snapshots",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "metric_type": {
          "name": "metric_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "dimensions": {
          "name": "dimensions",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "timestamp": {
          "name": "timestamp",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "metric_snapshots_repository_id_repositories_id_fk": {
          "name": "metric_snapshots_repository_id_repositories_id_fk",
          "tableFrom": "metric_snapshots",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.migration_detections": {
      "name": "migration_detections",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "migration_type": {
          "name": "migration_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "tool": {
          "name": "tool",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "files": {
          "name": "files",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "is_reversible": {
          "name": "is_reversible",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false
        },
        "requires_downtime": {
          "name": "requires_downtime",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "migration_detections_pull_request_id_pull_requests_id_fk": {
          "name": "migration_detections_pull_request_id_pull_requests_id_fk",
          "tableFrom": "migration_detections",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pr_issue_links": {
      "name": "pr_issue_links",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "issue_id": {
          "name": "issue_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "link_type": {
          "name": "link_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "pr_issue_links_pull_request_id_pull_requests_id_fk": {
          "name": "pr_issue_links_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pr_issue_links",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_issue_links_issue_id_issues_id_fk": {
          "name": "pr_issue_links_issue_id_issues_id_fk",
          "tableFrom": "pr_issue_links",
          "tableTo": "issues",
          "columnsFrom": [
            "issue_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.rate_limit_logs": {
      "name": "rate_limit_logs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "rule_id": {
          "name": "rule_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "request_count": {
          "name": "request_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "window_start": {
          "name": "window_start",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "blocked": {
          "name": "blocked",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "rate_limit_logs_rule_id_rate_limit_rules_id_fk": {
          "name": "rate_limit_logs_rule_id_rate_limit_rules_id_fk",
          "tableFrom": "rate_limit_logs",
          "tableTo": "rate_limit_rules",
          "columnsFrom": [
            "rule_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.rate_limit_rules": {
      "name": "rate_limit_rules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "method": {
          "name": "method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "window_ms": {
          "name": "window_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "max_requests": {
          "name": "max_requests",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "key_type": {
          "name": "key_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'ip'"
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.repository_workflows": {
      "name": "repository_workflows",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "template_id": {
          "name": "template_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "repository_workflows_repository_id_repositories_id_fk": {
          "name": "repository_workflows_repository_id_repositories_id_fk",
          "tableFrom": "repository_workflows",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "repository_workflows_template_id_workflow_templates_id_fk": {
          "name": "repository_workflows_template_id_workflow_templates_id_fk",
          "tableFrom": "repository_workflows",
          "tableTo": "workflow_templates",
          "columnsFrom": [
            "template_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.required_status_checks": {
      "name": "required_status_checks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "branch": {
          "name": "branch",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "check_name": {
          "name": "check_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_required": {
          "name": "is_required",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "strict_mode": {
          "name": "strict_mode",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "path_filter": {
          "name": "path_filter",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "required_status_checks_repository_id_repositories_id_fk": {
          "name": "required_status_checks_repository_id_repositories_id_fk",
          "tableFrom": "required_status_checks",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.review_templates": {
      "name": "review_templates",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_default": {
          "name": "is_default",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "review_templates_repository_id_repositories_id_fk": {
          "name": "review_templates_repository_id_repositories_id_fk",
          "tableFrom": "review_templates",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.saml_configs": {
      "name": "saml_configs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "entity_id": {
          "name": "entity_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "sso_url": {
          "name": "sso_url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "certificate": {
          "name": "certificate",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "signature_algorithm": {
          "name": "signature_algorithm",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'RSA-SHA256'"
        },
        "digest_algorithm": {
          "name": "digest_algorithm",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'SHA256'"
        },
        "is_enabled": {
          "name": "is_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.secret_scan_results": {
      "name": "secret_scan_results",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "commit_sha": {
          "name": "commit_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "secret_type": {
          "name": "secret_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "file": {
          "name": "file",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "line": {
          "name": "line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "snippet": {
          "name": "snippet",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "severity": {
          "name": "severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'open'"
        },
        "resolved_at": {
          "name": "resolved_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "resolved_by_id": {
          "name": "resolved_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "secret_scan_results_repository_id_repositories_id_fk": {
          "name": "secret_scan_results_repository_id_repositories_id_fk",
          "tableFrom": "secret_scan_results",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_states": {
      "name": "workflow_states",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "color": {
          "name": "color",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'#6b7280'"
        },
        "icon": {
          "name": "icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "display_order": {
          "name": "display_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "is_default": {
          "name": "is_default",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_closed_state": {
          "name": "is_closed_state",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "workflow_states_repository_id_repositories_id_fk": {
          "name": "workflow_states_repository_id_repositories_id_fk",
          "tableFrom": "workflow_states",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_templates": {
      "name": "workflow_templates",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "language": {
          "name": "language",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_official": {
          "name": "is_official",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_public": {
          "name": "is_public",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "downloads": {
          "name": "downloads",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'0'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.workflow_transitions": {
      "name": "workflow_transitions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "from_state_id": {
          "name": "from_state_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "to_state_id": {
          "name": "to_state_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "requires_comment": {
          "name": "requires_comment",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "workflow_transitions_repository_id_repositories_id_fk": {
          "name": "workflow_transitions_repository_id_repositories_id_fk",
          "tableFrom": "workflow_transitions",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "workflow_transitions_from_state_id_workflow_states_id_fk": {
          "name": "workflow_transitions_from_state_id_workflow_states_id_fk",
          "tableFrom": "workflow_transitions",
          "tableTo": "workflow_states",
          "columnsFrom": [
            "from_state_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "workflow_transitions_to_state_id_workflow_states_id_fk": {
          "name": "workflow_transitions_to_state_id_workflow_states_id_fk",
          "tableFrom": "workflow_transitions",
          "tableTo": "workflow_states",
          "columnsFrom": [
            "to_state_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.package_versions": {
      "name": "package_versions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "package_id": {
          "name": "package_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "version": {
          "name": "version",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "digest": {
          "name": "digest",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "size_bytes": {
          "name": "size_bytes",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "storage_path": {
          "name": "storage_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "metadata": {
          "name": "metadata",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "git_ref": {
          "name": "git_ref",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "published_by_id": {
          "name": "published_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "download_count": {
          "name": "download_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "yanked": {
          "name": "yanked",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "pkg_version_idx": {
          "name": "pkg_version_idx",
          "columns": [
            {
              "expression": "package_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "version",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "pkg_digest_idx": {
          "name": "pkg_digest_idx",
          "columns": [
            {
              "expression": "digest",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "package_versions_package_id_packages_id_fk": {
          "name": "package_versions_package_id_packages_id_fk",
          "tableFrom": "package_versions",
          "tableTo": "packages",
          "columnsFrom": [
            "package_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "package_versions_published_by_id_users_id_fk": {
          "name": "package_versions_published_by_id_users_id_fk",
          "tableFrom": "package_versions",
          "tableTo": "users",
          "columnsFrom": [
            "published_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.packages": {
      "name": "packages",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "visibility": {
          "name": "visibility",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'private'"
        },
        "download_count": {
          "name": "download_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_by_id": {
          "name": "created_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "pkg_org_type_name_idx": {
          "name": "pkg_org_type_name_idx",
          "columns": [
            {
              "expression": "organization_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "pkg_type_idx": {
          "name": "pkg_type_idx",
          "columns": [
            {
              "expression": "type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "packages_organization_id_organizations_id_fk": {
          "name": "packages_organization_id_organizations_id_fk",
          "tableFrom": "packages",
          "tableTo": "organizations",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "packages_repository_id_repositories_id_fk": {
          "name": "packages_repository_id_repositories_id_fk",
          "tableFrom": "packages",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "packages_created_by_id_users_id_fk": {
          "name": "packages_created_by_id_users_id_fk",
          "tableFrom": "packages",
          "tableTo": "users",
          "columnsFrom": [
            "created_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ai_inline_comments": {
      "name": "ai_inline_comments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "analysis_id": {
          "name": "analysis_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "file_path": {
          "name": "file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "line": {
          "name": "line",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "end_line": {
          "name": "end_line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "side": {
          "name": "side",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'right'"
        },
        "severity": {
          "name": "severity",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "suggested_fix": {
          "name": "suggested_fix",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "explanation": {
          "name": "explanation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "confidence": {
          "name": "confidence",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "is_resolved": {
          "name": "is_resolved",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "is_applied": {
          "name": "is_applied",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "applied_at": {
          "name": "applied_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "dismissed_at": {
          "name": "dismissed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "ai_inline_comments_analysis_idx": {
          "name": "ai_inline_comments_analysis_idx",
          "columns": [
            {
              "expression": "analysis_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "ai_inline_comments_pr_idx": {
          "name": "ai_inline_comments_pr_idx",
          "columns": [
            {
              "expression": "pull_request_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "ai_inline_comments_path_idx": {
          "name": "ai_inline_comments_path_idx",
          "columns": [
            {
              "expression": "file_path",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "ai_inline_comments_severity_idx": {
          "name": "ai_inline_comments_severity_idx",
          "columns": [
            {
              "expression": "severity",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "ai_inline_comments_analysis_id_pr_review_analyses_id_fk": {
          "name": "ai_inline_comments_analysis_id_pr_review_analyses_id_fk",
          "tableFrom": "ai_inline_comments",
          "tableTo": "pr_review_analyses",
          "columnsFrom": [
            "analysis_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "ai_inline_comments_pull_request_id_pull_requests_id_fk": {
          "name": "ai_inline_comments_pull_request_id_pull_requests_id_fk",
          "tableFrom": "ai_inline_comments",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ai_review_threads": {
      "name": "ai_review_threads",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "analysis_id": {
          "name": "analysis_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "file_path": {
          "name": "file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "line": {
          "name": "line",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "messages": {
          "name": "messages",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "ai_thread_analysis_idx": {
          "name": "ai_thread_analysis_idx",
          "columns": [
            {
              "expression": "analysis_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "ai_thread_pr_idx": {
          "name": "ai_thread_pr_idx",
          "columns": [
            {
              "expression": "pull_request_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "ai_review_threads_analysis_id_pr_review_analyses_id_fk": {
          "name": "ai_review_threads_analysis_id_pr_review_analyses_id_fk",
          "tableFrom": "ai_review_threads",
          "tableTo": "pr_review_analyses",
          "columnsFrom": [
            "analysis_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "ai_review_threads_pull_request_id_pull_requests_id_fk": {
          "name": "ai_review_threads_pull_request_id_pull_requests_id_fk",
          "tableFrom": "ai_review_threads",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.file_summaries": {
      "name": "file_summaries",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "analysis_id": {
          "name": "analysis_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "file_path": {
          "name": "file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "language": {
          "name": "language",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "risk_level": {
          "name": "risk_level",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "additions": {
          "name": "additions",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "deletions": {
          "name": "deletions",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "complexity_score": {
          "name": "complexity_score",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "file_summaries_analysis_idx": {
          "name": "file_summaries_analysis_idx",
          "columns": [
            {
              "expression": "analysis_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "file_summaries_path_idx": {
          "name": "file_summaries_path_idx",
          "columns": [
            {
              "expression": "file_path",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "file_summaries_analysis_id_pr_review_analyses_id_fk": {
          "name": "file_summaries_analysis_id_pr_review_analyses_id_fk",
          "tableFrom": "file_summaries",
          "tableTo": "pr_review_analyses",
          "columnsFrom": [
            "analysis_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pr_review_analyses": {
      "name": "pr_review_analyses",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "pull_request_id": {
          "name": "pull_request_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "repository_id": {
          "name": "repository_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "complexity_data": {
          "name": "complexity_data",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "dependency_graph": {
          "name": "dependency_graph",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "architecture_impact": {
          "name": "architecture_impact",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "change_groups": {
          "name": "change_groups",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "blast_radius": {
          "name": "blast_radius",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "health_score": {
          "name": "health_score",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "health_grade": {
          "name": "health_grade",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "summaries": {
          "name": "summaries",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "base_sha": {
          "name": "base_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "head_sha": {
          "name": "head_sha",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "files_analyzed": {
          "name": "files_analyzed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "chunks_processed": {
          "name": "chunks_processed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "total_additions": {
          "name": "total_additions",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "total_deletions": {
          "name": "total_deletions",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "model": {
          "name": "model",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "tokens_used": {
          "name": "tokens_used",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "cost_cents": {
          "name": "cost_cents",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "raw_ai_response": {
          "name": "raw_ai_response",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "triggered_by_id": {
          "name": "triggered_by_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "error_message": {
          "name": "error_message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "pr_analysis_pr_idx": {
          "name": "pr_analysis_pr_idx",
          "columns": [
            {
              "expression": "pull_request_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "pr_analysis_repo_idx": {
          "name": "pr_analysis_repo_idx",
          "columns": [
            {
              "expression": "repository_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "pr_analysis_status_idx": {
          "name": "pr_analysis_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "pr_analysis_created_idx": {
          "name": "pr_analysis_created_idx",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "pr_review_analyses_pull_request_id_pull_requests_id_fk": {
          "name": "pr_review_analyses_pull_request_id_pull_requests_id_fk",
          "tableFrom": "pr_review_analyses",
          "tableTo": "pull_requests",
          "columnsFrom": [
            "pull_request_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_review_analyses_repository_id_repositories_id_fk": {
          "name": "pr_review_analyses_repository_id_repositories_id_fk",
          "tableFrom": "pr_review_analyses",
          "tableTo": "repositories",
          "columnsFrom": [
            "repository_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "pr_review_analyses_triggered_by_id_users_id_fk": {
          "name": "pr_review_analyses_triggered_by_id_users_id_fk",
          "tableFrom": "pr_review_analyses",
          "tableTo": "users",
          "columnsFrom": [
            "triggered_by_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {},
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}